]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Backport of 11496 to rec-4.6.x: Prevent segfault with empty allow-from-file... 11569/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 22 Apr 2022 08:37:56 +0000 (10:37 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 22 Apr 2022 08:37:56 +0000 (10:37 +0200)
pdns/pdns_recursor.cc

index 1700a9fde78ca43c5e73eec6aa2bee708b5b2130..ea455bb482484a1ef6948ec1e29dd2a70edd8e90 100644 (file)
@@ -4775,8 +4775,6 @@ static std::shared_ptr<NetmaskGroup> parseACL(const std::string& aclFile, const
       result->addMask(line);
     }
     g_log<<Logger::Info<<"Done parsing "<<result->size()<<" "<<aclSetting<<" ranges from file '"<<::arg()[aclFile]<<"' - overriding '"<<aclSetting<<"' setting"<<endl;
-
-    return result;
   }
   else if(!::arg()[aclSetting].empty()) {
     vector<string> ips;
@@ -4790,11 +4788,9 @@ static std::shared_ptr<NetmaskGroup> parseACL(const std::string& aclFile, const
       g_log<<Logger::Info<<*i;
     }
     g_log<<Logger::Info<<endl;
-
-    return result;
   }
 
-  return nullptr;
+  return result;
 }
 
 void parseACLs()