From bcb5d42171386709c716312b711a0c15aa368f3f Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Thu, 18 Apr 2019 16:33:21 +0200 Subject: [PATCH] OPENSSL_LH_flush(): assign NULL after freeing OPENSSL_LH_flush() frees the linked lists for each slot, but didn't set the list head to NULL after doing so, with the result that an operation that affects these lists is likely to cause a crash. Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/8781) --- crypto/lhash/lhash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/lhash/lhash.c b/crypto/lhash/lhash.c index aa0ca1c957..e3c7ac456b 100644 --- a/crypto/lhash/lhash.c +++ b/crypto/lhash/lhash.c @@ -98,6 +98,7 @@ void OPENSSL_LH_flush(OPENSSL_LHASH *lh) OPENSSL_free(n); n = nn; } + lh->b[i] = NULL; } } -- 2.34.1