From: Tomas Mraz Date: Thu, 22 Aug 2024 12:49:05 +0000 (+0200) Subject: fuzz/hashtable.c: rc == -1 on insert is OK when fuzzing X-Git-Tag: openssl-3.4.0-alpha1~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c1713aeed4dc7d1ac25e9e365b8bd98afead638;p=thirdparty%2Fopenssl.git fuzz/hashtable.c: rc == -1 on insert is OK when fuzzing Reviewed-by: Matt Caswell Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/25273) --- diff --git a/fuzz/hashtable.c b/fuzz/hashtable.c index b131d16bcc1..38d22950763 100644 --- a/fuzz/hashtable.c +++ b/fuzz/hashtable.c @@ -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 */