summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:58:30 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:58:30 +0000
commit6a3da7a60bbd7ec72596a68c6e8e79c19cb04729 (patch)
tree0d09ccb7c9abdbd4d8476271632772789700fd25 /apt-pkg/pkgcachegen.cc
parentc37b9502fd00e03d7722314f94beb4f1441f621f (diff)
Increase the range of the ID type for deps
Author: jgg Date: 2001-07-01 22:28:24 GMT Increase the range of the ID type for deps
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r--apt-pkg/pkgcachegen.cc11
1 files changed, 10 insertions, 1 deletions
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;
}
/*}}}*/