From 275024e9ae6c827ebb664bd1c0c3264bcff343c0 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 18 Jul 2012 13:48:46 +0200 Subject: [PATCH] * apt-pkg/packagemanager.cc: - do not segfault if nothing can be configured to statisfy a pre-depends (e.g. in a pre-depends loop) (Closes: #681958) --- apt-pkg/packagemanager.cc | 2 +- debian/changelog | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index 46fc499c..b93bf6ab 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -643,7 +643,7 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c } // Look for something that could be configured. - for (DepIterator Cur = Start; Bad == true; ++Cur) + for (DepIterator Cur = Start; Bad == true && Cur.end() == false; ++Cur) { SPtrArray VList = Cur.AllTargets(); for (Version **I = VList; *I != 0; ++I) diff --git a/debian/changelog b/debian/changelog index c33b9d4b..d3f599e7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,9 @@ apt (0.9.7.3) UNRELEASED; urgency=low * apt-pkg/cacheset.cc: - handle :all and :native correctly as architectures again in the commandline parsing (regression in 0.9.7) + * apt-pkg/packagemanager.cc: + - do not segfault if nothing can be configured to statisfy + a pre-depends (e.g. in a pre-depends loop) (Closes: #681958) -- David Kalnischkies Wed, 18 Jul 2012 11:45:57 +0200 -- 2.20.1