forked from wolfSSL/wolfssl
wolfcrypt/src/evp.c: fix wolfSSL_EVP_CipherUpdate_GCM() to not fail when inl is zero, to properly handle realloc implementations that return NULL for zero-size allocations.
This commit is contained in:
@@ -580,7 +580,7 @@ static int wolfSSL_EVP_CipherUpdate_GCM(WOLFSSL_EVP_CIPHER_CTX *ctx,
|
|||||||
*outl = inl;
|
*outl = inl;
|
||||||
if (out) {
|
if (out) {
|
||||||
/* Buffer input for one-shot API */
|
/* Buffer input for one-shot API */
|
||||||
if (ret == 0) {
|
if (inl > 0) {
|
||||||
byte* tmp;
|
byte* tmp;
|
||||||
tmp = (byte*)XREALLOC(ctx->gcmBuffer,
|
tmp = (byte*)XREALLOC(ctx->gcmBuffer,
|
||||||
ctx->gcmBufferLen + inl, NULL,
|
ctx->gcmBufferLen + inl, NULL,
|
||||||
|
Reference in New Issue
Block a user