Просмотр исходного кода

* fix a crash in apt-ftparchive

Michael Vogt лет назад: 21
Родитель
Сommit
7524e34882
2 измененных файлов с 5 добавлено и 2 удалено
  1. 2 0
      debian/changelog
  2. 3 2
      ftparchive/writer.cc

+ 2 - 0
debian/changelog

@@ -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)
   
  --
 

+ 3 - 2
ftparchive/writer.cc

@@ -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;
       }
    }