From: Michael Vogt Date: Thu, 25 Jul 2013 18:14:59 +0000 (+0200) Subject: fix off-by-one error and do not use magic constant of 100 when checking StackPost X-Git-Tag: 0.9.11~15^2~18 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/26d5b68a008cfedec113ebdde782c3d18478a5b4?ds=sidebyside fix off-by-one error and do not use magic constant of 100 when checking StackPost --- 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