From: Michael Vogt Date: Thu, 6 Jun 2013 17:17:25 +0000 (+0200) Subject: Merge branch 'debian/sid' of https://github.com/ion1/apt into debian/sid X-Git-Tag: 0.9.9~10^2 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/920fa16da3724e6359b60e6ac0c482343651e440?hp=ecc46c1c42bb1aa59a0c8f0fb3eb12a5938da6ca Merge branch 'debian/sid' of https://github.com/ion1/apt into debian/sid --- diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index f18e17005..46661887a 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1424,8 +1424,11 @@ bool FileFd::Seek(unsigned long long To) return _error->Error("Reopen is only implemented for read-only files!"); } #ifdef HAVE_BZ2 - if (d->bz2 != NULL) - BZ2_bzclose(d->bz2); + if (d->bz2 != NULL) + { + BZ2_bzclose(d->bz2); + d->bz2 = NULL; + } #endif if (iFd != -1) close(iFd); diff --git a/debian/changelog b/debian/changelog index b3800fc42..7d22ba396 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,13 @@ apt (0.9.8.2) UNRELEASED; urgency=low [ Michael Vogt ] * buildlib/apti18n.h.in: - fix build failure when building without NLS (closes: #671587) + + [ Gregoire Menuel ] + * Fix double free (closes: #711045) + + [ Raphael Geissert ] + * Fix crash when the "mirror" method does not find any entry + (closes: #699303) [ Johan Kiviniemi ] * cmdline/apt-key: diff --git a/methods/mirror.cc b/methods/mirror.cc index d6c5ba955..854366318 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -311,6 +311,9 @@ bool MirrorMethod::InitMirrors() AllMirrors.push_back(s); } + if (AllMirrors.empty()) { + return _error->Error(_("No entry found in mirror file '%s'"), MirrorFile.c_str()); + } Mirror = AllMirrors[0]; UsedMirror = Mirror; return true;