Преглед изворни кода

Fix a segfault in the version merger introduced in the previous patch:
As we skip now versions with a different hash we will have situations
in which the version is equal but the hash different causing to check
the next version, but as this version was the last one the version
iterator is invalid then the merger wants to add further information.

David Kalnischkies пре 16 година
родитељ
комит
e426a5ff1c
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      apt-pkg/pkgcachegen.cc

+ 1 - 1
apt-pkg/pkgcachegen.cc

@@ -190,7 +190,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List,
       }
 
       /* We already have a version for this item, record that we saw it */
-      if (Res == 0)
+      if (Res == 0 && Ver.end() == false && Ver->Hash == Hash)
       {
 	 if (List.UsePackage(Pkg,Ver) == false)
 	    return _error->Error(_("Error occurred while processing %s (UsePackage2)"),