mirror of https://github.com/wolfSSL/wolfssl.git
prevent allocation of size 0
parent
b8aa335dd6
commit
33ab901b3f
|
@ -17564,7 +17564,7 @@ int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
|||
#ifndef NO_RSA
|
||||
case rsa_sa_algo:
|
||||
{
|
||||
if (verifySig == NULL) {
|
||||
if (verifySig == NULL && ssl->sigLen > 0) {
|
||||
verifySig = (byte*)XMALLOC(ssl->sigLen, ssl->heap,
|
||||
DYNAMIC_TYPE_TMP_BUFFER);
|
||||
if (!verifySig) {
|
||||
|
@ -17610,7 +17610,7 @@ int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
|||
break;
|
||||
}
|
||||
|
||||
if (verifySig == NULL) {
|
||||
if (verifySig == NULL && ssl->sigLen > 0) {
|
||||
verifySig = (byte*)XMALLOC(ssl->sigLen, ssl->heap,
|
||||
DYNAMIC_TYPE_TMP_BUFFER);
|
||||
if (!verifySig) {
|
||||
|
|
Loading…
Reference in New Issue