From 57bbd0b1c0fed32c86fdcc375e37a36e8b6da5f5 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 30 Dec 2016 13:48:31 -0800 Subject: You have to do the bounds check before the access. --- apt-pkg/tagfile.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 250f7ac17..14f89f797 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -390,7 +390,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; } -- cgit v1.2.3