Merge pull request #3479 from tmael/ocsp_NULL

Check <hash> input parameter in GetCA
This commit is contained in:
David Garske 2020-11-10 14:46:05 -08:00 committed by GitHub
commit fcd73135f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4307,11 +4307,13 @@ Signer* GetCA(void* vp, byte* hash)
WOLFSSL_CERT_MANAGER* cm = (WOLFSSL_CERT_MANAGER*)vp;
Signer* ret = NULL;
Signer* signers;
word32 row = HashSigner(hash);
word32 row = 0;
if (cm == NULL)
if (cm == NULL || hash == NULL)
return NULL;
row = HashSigner(hash);
if (wc_LockMutex(&cm->caLock) != 0)
return ret;