From 83281a74766e31ff7197c7ebc4a331e9dad89e8f Mon Sep 17 00:00:00 2001 From: bert hubert Date: Wed, 6 May 2015 20:48:17 +0200 Subject: [PATCH] be careful reading empty lines in our config parser and prevent integer overflow. 1 line diff. --- pdns/arguments.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.47.2