]> git.saurik.com Git - apt.git/commitdiff
Fix double free (closes: #711045)
authorMichael Vogt <mvo@debian.org>
Thu, 6 Jun 2013 16:20:35 +0000 (18:20 +0200)
committerMichael Vogt <mvo@debian.org>
Thu, 6 Jun 2013 16:20:35 +0000 (18:20 +0200)
* Fix double free (closes: #711045)

* Fix crash when the "mirror" method does not find any entry
  (closes: #699303)

debian/changelog
methods/mirror.cc

index f0eb0421d9f02321e95cdb41ea7b412a50319736..e31070aece052feec22a4e0dbe72f8a5dd943ab3 100644 (file)
@@ -11,7 +11,11 @@ apt (0.9.8.2) UNRELEASED; urgency=low
     - fix build failure when building without NLS (closes: #671587)
   
   [ Gregoire Menuel ]
-  * fix double free (closes: #711045)
+  * Fix double free (closes: #711045)
+  
+  [ Raphael Geissert ]
+  * Fix crash when the "mirror" method does not find any entry
+    (closes: #699303)
 
  -- Christian Perrier <bubulle@debian.org>  Thu, 16 May 2013 22:28:22 +0200
 
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;