summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-03-18 13:27:55 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-03-18 13:27:55 +0100
commite426a5ff1cd02797b29f5781be4d6fc8bdf44610 (patch)
tree2b3ec56549be553e53e1d06ed58485721d322e75 /apt-pkg
parent6086b2b2a250c066b713097ea70a08f9ae225692 (diff)
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.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/pkgcachegen.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 75a0e34f0..47ead2df9 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/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)"),