From: Ben Laurie Date: Mon, 19 May 2014 17:20:54 +0000 (+0100) Subject: Fix signed/unsigned warning. X-Git-Tag: OpenSSL_1_0_0m~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c01a838d623a156f1ec912382d63bd219a049dba;p=openssl Fix signed/unsigned warning. (cherry picked from commit 989d87cb1a174a951efd829ff6b2f68a322f9df8) --- diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index 67f162c560..988bfe5704 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -579,10 +579,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; @@ -606,7 +607,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);