ソースを参照

Fixed possible seg fault if there are no versions
Author: jgg
Date: 2001-05-27 03:46:10 GMT
Fixed possible seg fault if there are no versions

Arch Librarian 22 年 前
コミット
e481d5b040
共有1 個のファイルを変更した4 個の追加1 個の削除を含む
  1. 4 1
      apt-pkg/algorithms.cc

+ 4 - 1
apt-pkg/algorithms.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: algorithms.cc,v 1.35 2001/05/07 02:15:33 jgg Exp $
+// $Id: algorithms.cc,v 1.36 2001/05/27 03:46:10 jgg Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    Algorithms - A set of misc algorithms
    Algorithms - A set of misc algorithms
@@ -213,6 +213,9 @@ bool pkgApplyStatus(pkgDepCache &Cache)
 {
 {
    for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++)
    for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++)
    {
    {
+      if (I->VersionList == 0)
+	 continue;
+	 
       // Only choice for a ReInstReq package is to reinstall
       // Only choice for a ReInstReq package is to reinstall
       if (I->InstState == pkgCache::State::ReInstReq ||
       if (I->InstState == pkgCache::State::ReInstReq ||
 	  I->InstState == pkgCache::State::HoldReInstReq)
 	  I->InstState == pkgCache::State::HoldReInstReq)