diff options
author | Julian Andres Klode <jak@debian.org> | 2016-09-27 18:20:02 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-11-22 22:58:18 +0100 |
commit | 7a3b00b10b6a5a740e07fc1b68a4f3fb3bcdac23 (patch) | |
tree | 4a46568d49227b6ae8c6d614d247b8f1ed582997 /apt-pkg/deb | |
parent | 1236419d67e119acc7c0df48f8b14a277e0b5683 (diff) |
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.
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r-- | apt-pkg/deb/deblistparser.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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 |