summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/pkgcachegen.cc4
-rw-r--r--debian/changelog7
2 files changed, 7 insertions, 4 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 2b6d294fb..0e6ae698d 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -637,7 +637,9 @@ bool pkgCacheGenerator::FinishCache(OpProgress *Progress)
Dynamic<pkgCache::VerIterator> DynV(V);
for (; V.end() != true; V++)
{
- char const * const Arch = P.Arch();
+ // copy P.Arch() into a string here as a cache remap
+ // in NewDepends() later may alter the pointer location
+ string Arch = P.Arch() == NULL ? "" : P.Arch();
map_ptrloc *OldDepLast = NULL;
/* MultiArch handling introduces a lot of implicit Dependencies:
- MultiArch: same → Co-Installable if they have the same version
diff --git a/debian/changelog b/debian/changelog
index 05502a92a..2d3f1a9c9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,8 +6,9 @@ apt (0.8.16~exp5) UNRELEASED; urgency=low
- use ref-to-ptr semantic in NewDepends() to ensure that the
libapt does not segfault if the cache is remapped in between
(LP: #812862)
+ - fix crash when P.Arch() was used but the cache got remapped
- -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 29 Jul 2011 13:44:01 +0200
+ -- Michael Vogt <mvo@debian.org> Mon, 01 Aug 2011 15:31:55 +0200
apt (0.8.16~exp4) experimental; urgency=low
@@ -105,13 +106,13 @@ apt (0.8.16~exp1) experimental; urgency=low
-- Michael Vogt <mvo@debian.org> Wed, 29 Jun 2011 12:40:31 +0200
-apt (0.8.15.5) UNRELEASED; urgency=low
+apt (0.8.15.5) unstable; urgency=low
[ David Kalnischkies ]
* apt-pkg/deb/deblistparser.cc:
- do not assume that the last char on a line is a \n (Closes: #633350)
- -- David Kalnischkies <kalnischkies@gmail.com> Wed, 27 Jul 2011 23:25:45 +0200
+ -- Michael Vogt <mvo@debian.org> Thu, 28 Jul 2011 16:49:15 +0200
apt (0.8.15.4) unstable; urgency=low