From 3c1713aeed4dc7d1ac25e9e365b8bd98afead638 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Thu, 22 Aug 2024 14:49:05 +0200 Subject: [PATCH] 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) --- fuzz/hashtable.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fuzz/hashtable.c b/fuzz/hashtable.c index b131d16bcc..38d2295076 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 */