]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cachefile.cc
Run ./prepare-release pre-export
[apt.git] / apt-pkg / cachefile.cc
index aaa2436c5d787fcf4bcad623b1f93afc37efb963..39f1e72dbb5396a205be0b0c1e3b39113fcdc8eb 100644 (file)
@@ -80,6 +80,8 @@ bool pkgCacheFile::BuildCaches(OpProgress *Progress, bool WithLock)
       if (file.IsOpen() == false || file.Failed())
         return false;
       Map = new MMap(file, MMap::Public|MMap::ReadOnly);
+      if (unlikely(Map->validData() == false))
+        return false;
       Cache = new pkgCache(Map);
       return _error->PendingError() == false;
    }