Commit 4cdcfc3f authored by Ondřej Surý's avatar Ondřej Surý
Browse files

dnssec: don't qsort() empty hashlist

(cherry picked from commit 6bbb0b8e)
parent 19686397
......@@ -792,7 +792,10 @@ hashlist_comp(const void *a, const void *b) {
static void
hashlist_sort(hashlist_t *l) {
qsort(l->hashbuf, l->entries, l->length, hashlist_comp);
INSIST(l->hashbuf != NULL || l->length == 0);
if (l->length > 0) {
qsort(l->hashbuf, l->entries, l->length, hashlist_comp);
}
}
static bool
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment