From: Andy Polyakov Date: Fri, 14 Oct 2011 09:32:06 +0000 (+0000) Subject: e_aes.c: fix bug in aesni_gcm_tls_cipher. X-Git-Tag: OpenSSL-fips-2_0-rc1~61 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=027026df9fd8d6803bc10de1f533372f8c8fab30 e_aes.c: fix bug in aesni_gcm_tls_cipher. --- diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c index 558f1a197f..4b94b2a840 100644 --- a/crypto/evp/e_aes.c +++ b/crypto/evp/e_aes.c @@ -369,6 +369,7 @@ static int aesni_gcm_tls_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, /* Encrypt payload */ if (CRYPTO_gcm128_encrypt_ctr32(&gctx->gcm, in, out, len, aesni_ctr32_encrypt_blocks)) + goto err; out += len; /* Finally write tag */ CRYPTO_gcm128_tag(&gctx->gcm, out, EVP_GCM_TLS_TAG_LEN);