]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/deb/dpkgpm.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 27 Mar 2012 13:14:38 +0000 (15:14 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 27 Mar 2012 13:14:38 +0000 (15:14 +0200)
  - do not crash if (*I).Pkg is NULL (LP: #939867)

apt-pkg/deb/dpkgpm.cc
debian/changelog

index c46a812095cd17e97ce3e24aa6f5cb6af4790d50..be11870fd16b511a1e9b6d7ea85ef8441764ea0e 100644 (file)
@@ -1595,7 +1595,10 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
    const char *ops_str[] = {"Install", "Configure","Remove","Purge"};
    fprintf(report, "AptOrdering:\n");
    for (vector<Item>::iterator I = List.begin(); I != List.end(); ++I)
-      fprintf(report, " %s: %s\n", (*I).Pkg.Name(), ops_str[(*I).Op]);
+      if ((*I).Pkg != NULL)
+         fprintf(report, " %s: %s\n", (*I).Pkg.Name(), ops_str[(*I).Op]);
+      else
+         fprintf(report, " %s: %s\n", "NULL", ops_str[(*I).Op]);
 
    // attach dmesg log (to learn about segfaults)
    if (FileExists("/bin/dmesg"))
index 2003da5c3e262465fe9cec551d3e47c227483eb2..48b63784e0689be7aa6c3ccd0b7f56370e962391 100644 (file)
@@ -12,7 +12,12 @@ apt (0.8.16~exp14) UNRELEASED; urgency=low
     - recheck all dependencies if we changed a package in SmartConfigure
       as this could break an earlier dependency (LP: #940396)
     - recheck dependencies in SmartUnpack after a change, too
-
+  
+  [ Thorsten Spindler ]
+  * apt-pkg/deb/dpkgpm.cc:
+    - do not crash if (*I).Pkg is NULL (LP: #939867)
+  
+  
  -- David Kalnischkies <kalnischkies@gmail.com>  Tue, 13 Mar 2012 12:38:35 +0100
 
 apt (0.8.16~exp13) experimental; urgency=low