summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-09-19 11:39:20 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-09-19 11:39:20 +0200
commit9abb228384185565478a137446a74e42af0c95b5 (patch)
treee51cf60ff5c078e56427f818a4b90bc4c336aabf
parent7605509f7cc97e5e94d3159f9cd5c2c98b876720 (diff)
add 3 missing remap registrations causing a segfault in case
we use the not remapped iterators after a move of the mmap again
-rw-r--r--apt-pkg/pkgcachegen.cc3
-rw-r--r--debian/changelog2
2 files changed, 5 insertions, 0 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 5f37330c9..d5f1f9072 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -209,6 +209,7 @@ bool pkgCacheGenerator::MergeList(ListParser &List,
just for these :none packages to a proper MultiArchCache, so just ensure
that we have always a native package structure first for SingleArch */
pkgCache::PkgIterator NP;
+ Dynamic<pkgCache::PkgIterator> DynPkg(NP);
if (NewPackage(NP, PackageName, _config->Find("APT::Architecture")) == false)
// TRANSLATOR: The first placeholder is a package name,
// the other two should be copied verbatim as they include debug info
@@ -459,6 +460,7 @@ bool pkgCacheGenerator::MergeListVersion(ListParser &List, pkgCache::PkgIterator
map_ptrloc *OldDepLast = NULL;
pkgCache::VerIterator ConVersion = D.ParentVer();
+ Dynamic<pkgCache::VerIterator> DynV(ConVersion);
// duplicate the Conflicts/Breaks/Replaces for :none arch
if (D->Version == 0)
NewDepends(Pkg, ConVersion, "", 0, D->Type, OldDepLast);
@@ -772,6 +774,7 @@ unsigned long pkgCacheGenerator::NewVersion(pkgCache::VerIterator &Ver,
// Fill it in
Ver = pkgCache::VerIterator(Cache,Cache.VerP + Version);
+ Dynamic<pkgCache::VerIterator> DynV(Ver);
Ver->NextVer = Next;
Ver->ID = Cache.HeaderP->VersionCount++;
map_ptrloc const idxVerStr = WriteStringInMap(VerStr);
diff --git a/debian/changelog b/debian/changelog
index 5b0d049b7..b7f8e2045 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ apt (0.9.7.6) UNRELEASED; urgency=low
[ David Kalnischkies ]
* apt-pkg/pkgcachegen.cc:
- ensure that dependencies for packages:none are always generated
+ - add 3 missing remap registrations causing a segfault in case
+ we use the not remapped iterators after a move of the mmap again
-- David Kalnischkies <kalnischkies@gmail.com> Wed, 19 Sep 2012 11:29:56 +0200