]> git.saurik.com Git - apt.git/commitdiff
* fix a crash in apt-ftparchive
authorMichael Vogt <michael.vogt@ubuntu.com>
Wed, 19 Oct 2005 08:20:04 +0000 (08:20 +0000)
committerMichael Vogt <michael.vogt@ubuntu.com>
Wed, 19 Oct 2005 08:20:04 +0000 (08:20 +0000)
debian/changelog
ftparchive/writer.cc

index 78a7f890af2c778744018c7f8bbeaa62a52f67a3..f237e5d69d5432eb897224fc98a4e649370ba652 100644 (file)
@@ -19,6 +19,8 @@ apt (0.6.41.1) unstable; urgency=low
   * support for apt-get source -t (and honor pining) (closes: #152129)
   * added "APT::Authentication::Trust-CDROM" option to make the life
     for the installer people easier (closes: #334656)
+  * fix crash in apt-ftparchive (thanks to Bastian Blank for the patch)
+    (closes: #334671)
   
  --
 
index 0b68d0bbf74569ea0ae780e53ea9fe5f88d6064a..fc9ea27d7e52af22d10f5a8d8b46e6c21edead2e 100644 (file)
@@ -581,8 +581,6 @@ bool SourcesWriter::DoPackage(string FileName)
         auto_ptr<Override::Item> Itm(BOver.GetItem(BinList[I]));
         if (Itm.get() == 0)
            continue;
-        if (OverItem.get() == 0)
-           OverItem = Itm;
 
         unsigned char NewPrioV = debListParser::GetPrio(Itm->Priority);
         if (NewPrioV < BestPrioV || BestPrio.empty() == true)
@@ -590,6 +588,9 @@ bool SourcesWriter::DoPackage(string FileName)
            BestPrioV = NewPrioV;
            BestPrio = Itm->Priority;
         }       
+
+        if (OverItem.get() == 0)
+           OverItem = Itm;
       }
    }