]> git.saurik.com Git - apt.git/commitdiff
Fix a segfault in the version merger introduced in the previous patch:
authorDavid Kalnischkies <kalnischkies@gmail.com>
Thu, 18 Mar 2010 12:27:55 +0000 (13:27 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Thu, 18 Mar 2010 12:27:55 +0000 (13:27 +0100)
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.

apt-pkg/pkgcachegen.cc

index 75a0e34f076d8f5dbb23d468cdd0fddd5a1020d1..47ead2df90687ba177c8676e40b3d2595b58d7fb 100644 (file)
@@ -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)"),