From 6018a849f46c7f701adbc4c2474de0b1177f3711 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 26 Dec 2018 12:40:06 +0100 Subject: configuration: Compare size first during lookup --- apt-pkg/contrib/configuration.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg') 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 -- cgit v1.2.3-70-g09d2