summaryrefslogtreecommitdiff
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:40:54 +0100
commitd84ba7ea23b386f3fe56c4fe7a7aa8ece2e0c356 (patch)
tree13a8bf3aa0f2d9761f5074a5a494926bbb7c54d3 /ssl
parenta50f71868ece56af1be1e37504dc95df7154a90b (diff)
downloadopenssl-new-d84ba7ea23b386f3fe56c4fe7a7aa8ece2e0c356.tar.gz
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 fb9720f41d..02302a5dbf 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -644,6 +644,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;
@@ -667,7 +668,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);