Permalink
Browse files

be careful reading empty lines in our config parser and prevent integ…

…er overflow. 1 line diff.

(cherry picked from commit 83281a7)
  • Loading branch information...
1 parent 5d02d01 commit ffaae2b52b5aa5e7c37aff45ea7c36a23fb055bc @ahupowerdns ahupowerdns committed with rubenk May 6, 2015
Showing with 1 addition and 1 deletion.
  1. +1 −1 pdns/arguments.cc
View
@@ -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;
}

0 comments on commit ffaae2b

Please sign in to comment.