summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/deblistparser.cc4
-rw-r--r--apt-pkg/pkgcache.cc2
2 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index f7f64debd..99e806470 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -344,14 +344,14 @@ unsigned short debListParser::VersionHash()
{
const char *Start;
const char *End;
- if (Section.Find(I,Start,End) == false || End - Start >= (signed)sizeof(S))
+ if (Section.Find(I,Start,End) == false)
continue;
/* Strip out any spaces from the text, this undoes dpkgs reformatting
of certain fields. dpkg also has the rather interesting notion of
reformatting depends operators < -> <= */
char *J = S;
- for (; Start != End; ++Start)
+ for (; Start != End && (J - S) < sizeof(S); ++Start)
{
if (isspace_ascii(*Start) != 0)
continue;
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 27a0ba035..b4c232f8c 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -59,7 +59,7 @@ pkgCache::Header::Header()
/* Whenever the structures change the major version should be bumped,
whenever the generator changes the minor version should be bumped. */
APT_HEADER_SET(MajorVersion, 10);
- APT_HEADER_SET(MinorVersion, 6);
+ APT_HEADER_SET(MinorVersion, 7);
APT_HEADER_SET(Dirty, false);
APT_HEADER_SET(HeaderSz, sizeof(pkgCache::Header));