diff options
Diffstat (limited to 'apt-pkg/cachefile.cc')
-rw-r--r-- | apt-pkg/cachefile.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc index 96bcdc097..622d38367 100644 --- a/apt-pkg/cachefile.cc +++ b/apt-pkg/cachefile.cc @@ -67,6 +67,8 @@ bool pkgCacheFile::BuildCaches(OpProgress *Progress, bool WithLock) { Map = new MMap(*new FileFd(_config->FindFile("Dir::Cache::pkgcache"), FileFd::ReadOnly),MMap::Public|MMap::ReadOnly); + if (unlikely(Map->validData() == false)) + return false; Cache = new pkgCache(Map); if (_error->PendingError() == true) return false; |