From: Pieter Lexis Date: Thu, 28 Jul 2016 12:21:10 +0000 (+0200) Subject: Recursor: Fix a possible crash X-Git-Tag: auth-4.0.1~12^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93fe642d4396949740824bddc6ca11968f2f53e9;p=pdns Recursor: Fix a possible crash When the parser creates empty DNSNames (for whatever reason) and `rec_control current-queries` is run, the process would abort because it tried to print an empty DNSName. --- diff --git a/pdns/rec_channel_rec.cc b/pdns/rec_channel_rec.cc index a209e822a..336f43125 100644 --- a/pdns/rec_channel_rec.cc +++ b/pdns/rec_channel_rec.cc @@ -593,7 +593,7 @@ static string* pleaseGetCurrentQueries() for(MT_t::waiters_t::iterator mthread=MT->d_waiters.begin(); mthread!=MT->d_waiters.end() && n < 100; ++mthread, ++n) { const PacketID& pident = mthread->key; ostr << (fmt - % pident.domain.toString() /* ?? */ % DNSRecordContent::NumberToType(pident.type) + % pident.domain.toLogString() /* ?? */ % DNSRecordContent::NumberToType(pident.type) % pident.remote.toString() % (pident.sock ? 'Y' : 'n') % (pident.fd == -1 ? 'Y' : 'n') );