summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-07-25 20:14:59 +0200
committerMichael Vogt <mvo@debian.org>2013-07-25 20:14:59 +0200
commit26d5b68a008cfedec113ebdde782c3d18478a5b4 (patch)
treeba7185cd4ccd48205040ebdf3c7467f3f7f9bdc0 /apt-pkg
parent96ab3c6f62becde2fc67b81c65eef2881856fd22 (diff)
fix off-by-one error and do not use magic constant of 100 when checking StackPost
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/configuration.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 808a708a1..376617401 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -811,7 +811,7 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool const &AsSectio
// Go down a level
if (TermChar == '{')
{
- if (StackPos <= 100)
+ if (StackPos < sizeof(Stack)/sizeof(std::string))
Stack[StackPos++] = ParentTag;
/* Make sectional tags incorperate the section into the