diff options
author | Michael Vogt <mvo@debian.org> | 2014-07-16 15:48:05 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-07-16 15:50:52 +0200 |
commit | 9c3e15ab5f8b5864c43a08065a6bc8cf376fd138 (patch) | |
tree | 188c459b8a939962492b5ebbae45a57e5bfcc413 /apt-pkg/cacheset.cc | |
parent | b00efeaa5b0807fa1338ba8dd89f9b5e0ccbde60 (diff) |
Do not crash for apt-get install /dev/null
Thanks to Jakub Wilk for the bugreport.
Closes: #754904
Diffstat (limited to 'apt-pkg/cacheset.cc')
-rw-r--r-- | apt-pkg/cacheset.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc index 346bad3aa..d95a32aff 100644 --- a/apt-pkg/cacheset.cc +++ b/apt-pkg/cacheset.cc @@ -450,6 +450,8 @@ bool VersionContainerInterface::FromString(VersionContainerInterface * const vci if(FileExists(pkg)) { PackageContainerInterface::FromString(&pkgset, Cache, pkg, helper); + if(pkgset.size() == 0) + return false; return VersionContainerInterface::FromPackage(vci, Cache, pkgset.begin(), fallback, helper); } |