* cmdline/apt-get.cc: 0.7.25.3ubuntu6
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 8 Apr 2010 19:14:03 +0000 (21:14 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 8 Apr 2010 19:14:03 +0000 (21:14 +0200)
  - fix crash when pkg.VersionList() is empty (LP: #556056)

cmdline/apt-get.cc
debian/changelog

index 5de3fb0..b379dc8 100644 (file)
@@ -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 &&
index c740067..13d46ce 100644 (file)
@@ -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 ]