Permalink
Browse files

recursor: limit long version strings to 63 characters and catch excep…

…tions in secpoll
  • Loading branch information...
1 parent 1a02ba6 commit 18b7333828a1275ae5f5574a9c8330290d8557ff @mind04 mind04 committed with mind04 Jan 13, 2015
Showing with 6 additions and 2 deletions.
  1. +4 −1 pdns/pdns_recursor.cc
  2. +2 −1 pdns/secpoll-recursor.cc
@@ -1317,7 +1317,10 @@ try
}
if(now.tv_sec - last_secpoll >= 3600) {
- doSecPoll(&last_secpoll);
+ try {
+ doSecPoll(&last_secpoll);
+ }
+ catch(...) {}
}
}
}
@@ -23,7 +23,8 @@ void doSecPoll(time_t* last_secpoll)
vector<DNSResourceRecord> ret;
- string query = "recursor-" +string(PACKAGEVERSION)+ ".security-status."+::arg()["security-poll-suffix"];
+ string version = "recursor-" +string(PACKAGEVERSION);
+ string query = version.substr(0, 63)+ ".security-status."+::arg()["security-poll-suffix"];
if(*query.rbegin()!='.')
query+='.';

0 comments on commit 18b7333

Please sign in to comment.