NULL check wolfSSL_get_cipher_name_by_hash arguments.

Thanks to Cal Page for the report.
This commit is contained in:
Kareem
2026-05-07 15:57:47 -07:00
parent ef7671f664
commit 75e38c360f
+9 -1
View File
@@ -15147,7 +15147,15 @@ const char* wolfSSL_get_cipher_name_by_hash(WOLFSSL* ssl, const char* hash)
const char* name = NULL;
byte mac = no_mac;
int i;
const Suites* suites = WOLFSSL_SUITES(ssl);
const Suites* suites;
if (hash == NULL || ssl == NULL ||
(ssl->suites == NULL && ssl->ctx == NULL))
return NULL;
suites = WOLFSSL_SUITES(ssl);
if (suites == NULL)
return NULL;
if (XSTRCMP(hash, "SHA256") == 0) {
mac = sha256_mac;