summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2014-06-12 20:38:45 +0100
committerMatt Caswell <matt@openssl.org>2014-06-12 20:42:33 +0100
commit955bfbc2686153b50aebb045a42d96e5b026e29c (patch)
treea3ab53b0954ab90bce8768b514584d37fed47f74 /ssl
parent2eab488c026141cc11d26d6c55ed0f09b9278eba (diff)
Added OPENSSL_assert check as per PR#3377 reported by Rainer Jung <rainer.jung@kippdata.de>
Diffstat (limited to 'ssl')
-rw-r--r--ssl/s3_pkt.c3
1 files changed, 2 insertions, 1 deletions
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);