From 7a3b00b10b6a5a740e07fc1b68a4f3fb3bcdac23 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 27 Sep 2016 18:20:02 +0200 Subject: Introduce tolower_ascii_unsafe() and use it for hashing This one has some obvious collisions for non-alphabetical characters, like some control characters also hashing to numbers, but we don't really have those, and these are hash functions which are not collision free to begin with. --- apt-pkg/deb/deblistparser.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/deb/deblistparser.cc') diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 43fc4aa3a..549e75952 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -369,7 +369,7 @@ unsigned short debListParser::VersionHash() { if (isspace_ascii(*Start) != 0) continue; - *J++ = tolower_ascii(*Start); + *J++ = tolower_ascii_unsafe(*Start); /* Normalize <= to < and >= to >. This is the wrong way around, but * more efficient that the right way. And since we're only hashing -- cgit v1.2.3