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: auth-3.4.5~3^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ffaae2b52b5aa5e7c37aff45ea7c36a23fb055bc;p=pdns be careful reading empty lines in our config parser and prevent integer overflow. 1 line diff. (cherry picked from commit 83281a74766e31ff7197c7ebc4a331e9dad89e8f) --- diff --git a/pdns/arguments.cc b/pdns/arguments.cc index 9f4e1cacc..c154d0e82 100644 --- a/pdns/arguments.cc +++ b/pdns/arguments.cc @@ -390,7 +390,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; }