summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/pkgcache.cc6
-rw-r--r--apt-pkg/pkgcache.h4
-rw-r--r--apt-pkg/pkgcachegen.cc11
3 files changed, 15 insertions, 6 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index d0a86ec69..484cde5f4 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcache.cc,v 1.35 2001/05/14 05:54:10 jgg Exp $
+// $Id: pkgcache.cc,v 1.36 2001/07/01 22:28:24 jgg Exp $
/* ######################################################################
Package Cache - Accessor code for the cache
@@ -52,8 +52,8 @@ pkgCache::Header::Header()
/* Whenever the structures change the major version should be bumped,
whenever the generator changes the minor version should be bumped. */
- MajorVersion = 3;
- MinorVersion = 5;
+ MajorVersion = 4;
+ MinorVersion = 0;
Dirty = false;
HeaderSz = sizeof(pkgCache::Header);
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index 0d62c647a..b07951dfb 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcache.h,v 1.24 2001/05/07 04:24:08 jgg Exp $
+// $Id: pkgcache.h,v 1.25 2001/07/01 22:28:24 jgg Exp $
/* ######################################################################
Cache - Structure definitions for the cache file
@@ -261,9 +261,9 @@ struct pkgCache::Dependency
map_ptrloc ParentVer; // Version
// Specific types of depends
+ map_ptrloc ID;
unsigned char Type;
unsigned char CompareOp;
- unsigned short ID;
};
struct pkgCache::Provides
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 026f795eb..534217e9e 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcachegen.cc,v 1.49 2001/05/27 05:55:27 jgg Exp $
+// $Id: pkgcachegen.cc,v 1.50 2001/07/01 22:28:24 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
@@ -192,6 +192,15 @@ bool pkgCacheGenerator::MergeList(ListParser &List,
}
}
+ if (Cache.HeaderP->PackageCount >= (1ULL<<sizeof(Cache.PkgP->ID)*8)-1)
+ return _error->Error(_("Wow, you exceeded the number of package "
+ "names this APT is capable of."));
+ if (Cache.HeaderP->VersionCount >= (1ULL<<(sizeof(Cache.VerP->ID)*8))-1)
+ return _error->Error(_("Wow, you exceeded the number of versions "
+ "this APT is capable of."));
+ if (Cache.HeaderP->DependsCount >= (1ULL<<(sizeof(Cache.DepP->ID)*8))-1ULL)
+ return _error->Error(_("Wow, you exceeded the number of dependencies "
+ "this APT is capable of."));
return true;
}
/*}}}*/