summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorBen Laurie <ben@links.org>2014-05-19 18:20:54 +0100
committerDr. Stephen Henson <steve@openssl.org>2014-05-29 14:16:21 +0100
commit8e928aab02a4ebb491b6950d2829edad90e73245 (patch)
tree8d500dcb381aa07425119a0b4e2b067c639b38d9 /ssl
parent105e52bf231a081a110f021ea0f7b1d05d110bd6 (diff)
Fix signed/unsigned warning.
(cherry picked from commit 989d87cb1a174a951efd829ff6b2f68a322f9df8)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/s3_pkt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index 312d69094e..169f235c61 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -529,10 +529,11 @@ int ssl3_do_compress(SSL *ssl)
int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
{
const unsigned char *buf=buf_;
- unsigned int tot,n,nw;
- int i;
+ unsigned int n,nw;
+ int i,tot;
s->rwstate=SSL_NOTHING;
+ OPENSSL_assert(s->s3->wnum < INT_MAX);
tot=s->s3->wnum;
s->s3->wnum=0;
@@ -556,7 +557,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);