summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2015-12-29 14:37:14 +0100
committerJulian Andres Klode <jak@debian.org>2015-12-29 14:37:14 +0100
commit67c90775b650efe89d7d784cf913526cc3b63d07 (patch)
tree7800e6cbfee18fab820581e6bd4b7c99c0d05aa7 /apt-pkg
parent390344f9e754e9875d316d0cba192aac113240b1 (diff)
downloadapt-67c90775b650efe89d7d784cf913526cc3b63d07.tar.gz
pkgTagSection::Scan: Fix read of uninitialized value
We ignored the boundary of the buffer we were reading in while scanning for spaces.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/tagfile.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc
index a0b64f9ca..d5e61baf4 100644
--- a/apt-pkg/tagfile.cc
+++ b/apt-pkg/tagfile.cc
@@ -382,7 +382,7 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength, bool const R
lastTagHash = AlphaHash(Stop, EndTag - Stop);
// find the beginning of the value
Stop = Colon + 1;
- for (; isspace_ascii(*Stop) != 0; ++Stop)
+ for (; Stop < End && isspace_ascii(*Stop) != 0; ++Stop)
if (*Stop == '\n' && Stop[1] != ' ')
break;
if (Stop >= End)