In 0.7.0 the hash algorithm for the hash column of the audio file table
changed from the 20 byte sha1 to the 32 byte sha256. However, the audio file
selector kept calling hash_compare() as the comparator, which looks only at
the first 20 bytes of the buffers passed.
This omission is clearly a bug, but given that we still accept old clients
which only know about sha1, it's benign because the truncated sha256 should
not be worse than sha1. Fix the bug anyway.
Fixes: 126b950f1bd70d1e5c200bc4157bbbb2798fc838
static int aft_hash_compare(const struct osl_object *obj1,
const struct osl_object *obj2)
{
- return hash_compare((unsigned char *)obj1->data,
+ return hash2_compare((unsigned char *)obj1->data,
(unsigned char *)obj2->data);
}