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: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2513%2Fhead;p=thirdparty%2Fpdns.git 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 9f4e1caccd..c154d0e828 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; }