From a133f79c8766aee5b7d7811285e60b3d311d8473 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 27 Jan 2016 00:15:12 +0100 Subject: deal better with (very) small apt::cache-start values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- apt-pkg/cachefile.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/cachefile.cc') 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); -- cgit v1.2.3