Skip to content

Commit ffaae2b

Browse files
ahupowerdnsrubenk
authored andcommitted
be careful reading empty lines in our config parser and prevent integer overflow. 1 line diff.
(cherry picked from commit 83281a7)
1 parent 5d02d01 commit ffaae2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pdns/arguments.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ bool ArgvMap::parseFile(const char *fname, const string& arg, bool lax) {
390390
while(getline(f,pline)) {
391391
trim_right(pline);
392392

393-
if(pline[pline.size()-1]=='\\') {
393+
if(!pline.empty() && pline[pline.size()-1]=='\\') {
394394
line+=pline.substr(0,pline.length()-1);
395395
continue;
396396
}

0 commit comments

Comments
 (0)