]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix signed/unsigned warning.
authorBen Laurie <ben@links.org>
Mon, 19 May 2014 17:20:54 +0000 (18:20 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 29 May 2014 13:16:21 +0000 (14:16 +0100)
(cherry picked from commit 989d87cb1a174a951efd829ff6b2f68a322f9df8)

ssl/s3_pkt.c

index 312d69094eea116bf44fdfbf0c3b3a6b3205b048..169f235c61eafe68ef72d88f7989183dfb4f8800 100644 (file)
@@ -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);