diff --git a/src/internal.c b/src/internal.c index e0f3c899b..d5c3008df 100644 --- a/src/internal.c +++ b/src/internal.c @@ -8707,11 +8707,10 @@ static int SendHandshakeMsg(WOLFSSL* ssl, byte* input, word32 inputSz, outputSz += cipherExtraData(ssl); if ((ret = CheckAvailableSize(ssl, outputSz)) != 0) return ret; + if (ssl->buffers.outputBuffer.buffer == NULL) + return MEMORY_E; output = ssl->buffers.outputBuffer.buffer + ssl->buffers.outputBuffer.length; - /* scan-build complains that this may be null */ - if (output == NULL) - return MEMORY_E; if (IsEncryptionOn(ssl, 1)) { /* First we need to add the fragment header ourselves.