diff options
Diffstat (limited to 'freebsd/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c')
-rw-r--r-- | freebsd/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/freebsd/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c b/freebsd/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c index 4d9bf63b..2aaf8a62 100644 --- a/freebsd/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c +++ b/freebsd/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c @@ -861,6 +861,8 @@ static int aesni_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, key->payload_length = len; if ((key->aux.tls_ver = p[arg - 4] << 8 | p[arg - 3]) >= TLS1_1_VERSION) { + if (len < AES_BLOCK_SIZE) + return 0; len -= AES_BLOCK_SIZE; p[arg - 2] = len >> 8; p[arg - 1] = len; |