* cmdline/apt-get.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 8 Apr 2010 18:57:01 +0000 (20:57 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 8 Apr 2010 18:57:01 +0000 (20:57 +0200)
  - fix crash when pkg.VersionList() is empty

cmdline/apt-get.cc
debian/changelog

index 62f712c..cd450b2 100644 (file)
@@ -1304,6 +1304,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 &&
index edc82e1..9e3223a 100644 (file)
@@ -1,3 +1,10 @@
+apt (0.7.26~exp4) UNRELEASEDexperimental; urgency=low
+
+  * cmdline/apt-get.cc:
+    - fix crash when pkg.VersionList() is empty
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 08 Apr 2010 20:56:30 +0200
+
 apt (0.7.26~exp3) experimental; urgency=low
 
   [ Christian Perrier ]