]> git.saurik.com Git - apt.git/commitdiff
Merge branch 'debian/sid' of https://github.com/ion1/apt into debian/sid
authorMichael Vogt <mvo@debian.org>
Thu, 6 Jun 2013 17:17:25 +0000 (19:17 +0200)
committerMichael Vogt <mvo@debian.org>
Thu, 6 Jun 2013 17:17:25 +0000 (19:17 +0200)
apt-pkg/contrib/fileutl.cc
debian/changelog
methods/mirror.cc

index f18e1700529e6a9c6f22edd8fa46848de4d01123..46661887a1173c959a45fa466bb5f689e9afc761 100644 (file)
@@ -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);
index b3800fc4281f85a1ec54e7a1d7bcd5b32fc28b1a..7d22ba396ca462f7dd13c9f1b0b809db7c4df203 100644 (file)
@@ -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:
index d6c5ba955fe3becdd2f555a55e50a5ae7233d776..854366318f731d57b61580edd9b686d65d7ff571 100644 (file)
@@ -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;