Преглед изворни кода

You have to do the bounds check before the access.

Jay Freeman (saurik) пре 9 година
родитељ
комит
7cafe70555
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      apt-pkg/tagfile.cc

+ 1 - 1
apt-pkg/tagfile.cc

@@ -389,7 +389,7 @@ bool pkgTagSection::FindInternal(unsigned int Pos, const char *&Start,
    if (unlikely(Start > End))
       return _error->Error("Internal parsing error");
 
-   for (; isspace_ascii(End[-1]) != 0 && End > Start; --End);
+   for (; End > Start && isspace_ascii(End[-1]) != 0; --End);
 
    return true;
 }