forked from wolfSSL/wolfssl
prevent allocation of size 0
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user