From: Kees Monshouwer Date: Tue, 13 Jan 2015 11:54:27 +0000 (+0100) Subject: auth: limit long version strings to 63 characters and catch exceptions in secpoll X-Git-Tag: auth-3.3.2~2^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c45b6db84ed30fb33480a7a9ed90aa1676482bbd;p=thirdparty%2Fpdns.git auth: limit long version strings to 63 characters and catch exceptions in secpoll --- diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index 10e196a28f..142498d435 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -342,7 +342,10 @@ void mainthread() #ifndef WIN32 - doSecPoll(true); // this must be BEFORE chroot + try { + doSecPoll(true); // this must be BEFORE chroot + } + catch(...) {} if(!::arg()["chroot"].empty()) { if(::arg().mustDo("master") || ::arg().mustDo("slave")) diff --git a/pdns/secpoll-auth.cc b/pdns/secpoll-auth.cc index 3b4bcef934..b905cdd24d 100644 --- a/pdns/secpoll-auth.cc +++ b/pdns/secpoll-auth.cc @@ -125,7 +125,8 @@ void doSecPoll(bool first) struct timeval now; gettimeofday(&now, 0); - string query = "auth-" + string(PACKAGEVERSION) +".security-status."+::arg()["security-poll-suffix"]; + string version = "auth-" + string(PACKAGEVERSION); + string query = version.substr(0, 63) +".security-status."+::arg()["security-poll-suffix"]; if(*query.rbegin()!='.') query+='.';