소스 검색

fix off-by-one error and do not use magic constant of 100 when checking StackPost

Michael Vogt 13 년 전
부모
커밋
26d5b68a00
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      apt-pkg/contrib/configuration.cc

+ 1 - 1
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