aboutsummaryrefslogtreecommitdiff
path: root/openssl/ssl/t1_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/ssl/t1_enc.c')
-rw-r--r--openssl/ssl/t1_enc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/openssl/ssl/t1_enc.c b/openssl/ssl/t1_enc.c
index 201ca9ad6..f7bdeb3b9 100644
--- a/openssl/ssl/t1_enc.c
+++ b/openssl/ssl/t1_enc.c
@@ -889,6 +889,8 @@ int tls1_enc(SSL *s, int send)
if (s->version >= TLS1_1_VERSION
&& EVP_CIPHER_CTX_mode(ds) == EVP_CIPH_CBC_MODE)
{
+ if (bs > (int)rec->length)
+ return -1;
rec->data += bs; /* skip the explicit IV */
rec->input += bs;
rec->length -= bs;