]> granicus.if.org Git - pdns/commitdiff
be careful reading empty lines in our config parser and prevent integer overflow...
authorbert hubert <bert.hubert@netherlabs.nl>
Wed, 6 May 2015 18:48:17 +0000 (20:48 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Wed, 6 May 2015 18:48:17 +0000 (20:48 +0200)
pdns/arguments.cc

index 0137a6d6b7b5501009c5026ccbc7f1770d4ff1a4..82bf9dfb8488e1cd960f9849216c02d0f7e5c51f 100644 (file)
@@ -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;
     }