From: bert hubert Date: Wed, 6 May 2015 18:48:17 +0000 (+0200) Subject: be careful reading empty lines in our config parser and prevent integer overflow... X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~28^2~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=83281a74766e31ff7197c7ebc4a331e9dad89e8f;p=thirdparty%2Fpdns.git be careful reading empty lines in our config parser and prevent integer overflow. 1 line diff. --- diff --git a/pdns/arguments.cc b/pdns/arguments.cc index 0137a6d6b7..82bf9dfb84 100644 --- a/pdns/arguments.cc +++ b/pdns/arguments.cc @@ -393,7 +393,7 @@ bool ArgvMap::parseFile(const char *fname, const string& arg, bool lax) { while(getline(f,pline)) { trim_right(pline); - if(pline[pline.size()-1]=='\\') { + if(!pline.empty() && pline[pline.size()-1]=='\\') { line+=pline.substr(0,pline.length()-1); continue; }