From 955bfbc2686153b50aebb045a42d96e5b026e29c Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Thu, 12 Jun 2014 20:38:45 +0100 Subject: [PATCH] Added OPENSSL_assert check as per PR#3377 reported by Rainer Jung --- ssl/s3_pkt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index 22fb10d859..fe46cb0b88 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -605,6 +605,7 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len) int i; s->rwstate=SSL_NOTHING; + OPENSSL_assert(s->s3->wnum <= INT_MAX); tot=s->s3->wnum; s->s3->wnum=0; @@ -628,7 +629,7 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len) * buffer ... so we trap and report the error in a way the user * will notice */ - if ( len < tot) + if (len < tot) { SSLerr(SSL_F_SSL3_WRITE_BYTES,SSL_R_BAD_LENGTH); return(-1); -- 2.34.1