Explorar o código

* cmdline/apt-get.cc:
- fix crash when pkg.VersionList() is empty (LP: #556056)

Michael Vogt %!s(int64=16) %!d(string=hai) anos
pai
achega
b1fd12d41f
Modificáronse 2 ficheiros con 11 adicións e 0 borrados
  1. 4 0
      cmdline/apt-get.cc
  2. 7 0
      debian/changelog

+ 4 - 0
cmdline/apt-get.cc

@@ -1283,6 +1283,10 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
 		  break;
 	       fuzzy = true;
 	       Ver = Pkg.VersionList();
+	       // exit right away from the Pkg.VersionList() loop if we
+	       // don't have any versions
+	       if (Ver.end() == true)
+		  break;
 	    }
 	    // We match against a concrete version (or a part of this version)
 	    if (VerTag.empty() == false &&

+ 7 - 0
debian/changelog

@@ -1,3 +1,10 @@
+apt (0.7.25.3ubuntu6) lucid; urgency=low
+
+  * cmdline/apt-get.cc:
+    - fix crash when pkg.VersionList() is empty (LP: #556056)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 08 Apr 2010 21:13:25 +0200
+
 apt (0.7.25.3ubuntu5) lucid; urgency=low
 
   [ David Kalnischkies ]