]> git.saurik.com Git - apt.git/commitdiff
fix off-by-one error and do not use magic constant of 100 when checking StackPost
authorMichael Vogt <mvo@debian.org>
Thu, 25 Jul 2013 18:14:59 +0000 (20:14 +0200)
committerMichael Vogt <mvo@debian.org>
Thu, 25 Jul 2013 18:14:59 +0000 (20:14 +0200)
apt-pkg/contrib/configuration.cc

index 808a708a192142b6da323a1a271efbdfa4b7301b..376617401fb995b98d7e59308104d3ef8fdb73c9 100644 (file)
@@ -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