fuzz/hashtable.c: rc == -1 on insert is OK when fuzzing

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25273)
This commit is contained in:
Tomas Mraz 2024-08-22 14:49:05 +02:00
parent 8951ee06b4
commit 3c1713aeed

View File

@ -188,6 +188,10 @@ int FuzzerTestOneInput(const uint8_t *buf, size_t len)
rc = ossl_ht_fz_FUZZER_VALUE_insert(fuzzer_table, TO_HT_KEY(&key),
valptr, NULL);
if (rc == -1)
/* failed to grow the hash table due to too many collisions */
break;
/*
* mark the entry as being allocated
*/