]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/configuration.cc
fix "(error) Possible null pointer dereference: BindAddr" by ensuring
[apt.git] / apt-pkg / contrib / configuration.cc
index 0949ec2238752bde6f399c463ea61b663c75ecfc..36866a35ad2a85e846809f716faccf2d7c5b98b7 100644 (file)
@@ -185,8 +185,14 @@ string Configuration::FindFile(const char *Name,const char *Default) const
    }
    
    string val = Itm->Value;
-   while (Itm->Parent != 0 && Itm->Parent->Value.empty() == false)
-   {    
+   while (Itm->Parent != 0)
+   {
+      if (Itm->Parent->Value.empty() == true)
+      {
+        Itm = Itm->Parent;
+        continue;
+      }
+
       // Absolute
       if (val.length() >= 1 && val[0] == '/')
          break;