]> git.saurik.com Git - apt.git/commitdiff
fix crash when P.Arch() was used but the cache got remapped
authorMichael Vogt <egon@debian-devbox>
Mon, 1 Aug 2011 13:32:16 +0000 (15:32 +0200)
committerMichael Vogt <egon@debian-devbox>
Mon, 1 Aug 2011 13:32:16 +0000 (15:32 +0200)
apt-pkg/pkgcachegen.cc
debian/changelog

index 2b6d294fbf79aab1fecf56ab274556e09a378410..0e6ae698d39cf3e4b61bbffb8d3adc2ab0c0361e 100644 (file)
@@ -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
index 05502a92a9840ba1458976414de0cda868c7a7e1..2d3f1a9c923e3dc264743adb13bbcf269f9e3a9f 100644 (file)
@@ -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