diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-04-08 20:57:01 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-04-08 20:57:01 +0200 |
commit | 259f688a29728604d7930662e9743619982706ab (patch) | |
tree | 0e1ba40964ce444e8fed8edcf3caf87204eaca4d | |
parent | 22326578d84ee9df4b192dd5ba5120098afe97ea (diff) |
* cmdline/apt-get.cc:
- fix crash when pkg.VersionList() is empty
-rw-r--r-- | cmdline/apt-get.cc | 4 | ||||
-rw-r--r-- | debian/changelog | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 62f712c39..cd450b27a 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -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 && diff --git a/debian/changelog b/debian/changelog index edc82e1d7..9e3223abf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 ] |