summaryrefslogtreecommitdiff
path: root/apt-pkg/cachefile.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-01-27 00:15:12 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-01-27 00:15:12 +0100
commita133f79c8766aee5b7d7811285e60b3d311d8473 (patch)
tree3aacdd4256d6419760d6843e7574ba6c334a136b /apt-pkg/cachefile.cc
parent8efd5947bf7de0fc3db51b4871bcf3522018761d (diff)
deal better with (very) small apt::cache-start values
It is a bit academic to support values which aren't big enough to fit even the hashtables without resizing, but cleaning up ensures that we do the right thing (aka not segfaulting) even if something goes wrong in these deep layers. You still can't have very very small values through… Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/cachefile.cc')
-rw-r--r--apt-pkg/cachefile.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc
index 3e3540bbd..6db0749d4 100644
--- a/apt-pkg/cachefile.cc
+++ b/apt-pkg/cachefile.cc
@@ -221,7 +221,7 @@ bool pkgCacheFile::AddIndexFile(pkgIndexFile * const File) /*{{{*/
{
{
pkgCacheGenerator Gen(dynmmap, nullptr);
- if (File->Merge(Gen, nullptr) == false)
+ if (Gen.Start() == false || File->Merge(Gen, nullptr) == false)
return false;
}
Cache = new pkgCache(Map);