aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/evp
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-01-23 12:44:48 +0000
committerMatt Caswell <matt@openssl.org>2017-01-25 15:02:44 +0000
commit7c12c7b61c5b37c9dff930ccc68421fb7de00271 (patch)
treea7571c6fd3ee47465284749114f26a9c30610d5d /crypto/evp
parent0ba5a9eaa0a6ae7fc25ee70eefc1f4fbdaf09483 (diff)
downloadopenssl-7c12c7b61c5b37c9dff930ccc68421fb7de00271.tar.gz
Properly handle a partial block in OCB mode
If we have previously been passed a partial block in an "Update" call then make sure we properly increment the output buffer when we use it. Fixes #2273 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2275)
Diffstat (limited to 'crypto/evp')
-rw-r--r--crypto/evp/e_aes.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c
index 0fb3c16e4e..d3be6a086a 100644
--- a/crypto/evp/e_aes.c
+++ b/crypto/evp/e_aes.c
@@ -2587,6 +2587,8 @@ static int aes_ocb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
}
written_len = AES_BLOCK_SIZE;
*buf_len = 0;
+ if (out != NULL)
+ out += AES_BLOCK_SIZE;
}
/* Do we have a partial block to handle at the end? */