summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2018-12-26 12:40:06 +0100
committerJulian Andres Klode <jak@debian.org>2018-12-26 21:24:20 +0100
commit6018a849f46c7f701adbc4c2474de0b1177f3711 (patch)
tree6b325fad4156d706b557bce2d06938bf41cf00f1
parent37ae749b20485b6c8237d5b5a08cfdd58a2364e1 (diff)
configuration: Compare size first during lookup
-rw-r--r--apt-pkg/contrib/configuration.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 1c000e586..997ef7423 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -252,7 +252,7 @@ Configuration::Item *Configuration::Lookup(Item *Head,const char *S,
if (Len != 0)
{
for (; I != 0; Last = &I->Next, I = I->Next)
- if ((Res = stringcasecmp(I->Tag,S,S + Len)) == 0)
+ if (Len == I->Tag.length() && (Res = stringcasecmp(I->Tag,S,S + Len)) == 0)
break;
}
else