]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Corrected signed-to-unsigned comparisons
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 28 Sep 2012 11:14:31 +0000 (13:14 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 28 Sep 2012 15:47:46 +0000 (17:47 +0200)
lib/ext/max_record.c
lib/gnutls_buffers.c
lib/gnutls_int.h
lib/nettle/wmnaf.c

index 002c306d8c62bf694cba2b002698763278195766..9e2c42311b2b6ee68c9439847283bc22c70a94e0 100644 (file)
@@ -118,7 +118,7 @@ _gnutls_max_record_recv_params (gnutls_session_t session,
 
           new_size = _gnutls_mre_num2record (data[0]);
 
-          if (new_size < 0 || new_size != epriv.num)
+          if (new_size < 0 || new_size != (ssize_t)epriv.num)
             {
               gnutls_assert ();
               return GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER;
index 30db0336ed0dc4ddf3a5a67cb985f4f67829f309..3c5ba7057bbe1b2faa1b54623b086a8bf505f550 100644 (file)
@@ -1057,7 +1057,7 @@ _gnutls_parse_record_buffered_msgs (gnutls_session_t session)
           /* this is the rest of a previous message */
           if (session->internals.handshake_recv_buffer_size > 0 && recv_buf[0].length > 0 && remain > 0)
             {
-              if (msg.size <= remain)
+              if ((ssize_t)msg.size <= remain)
                 append = msg.size;
               else
                 append = remain;
index 29b7f7b38f059ac7a5965f3628170ef99912874b..806f3e3d34624784ab4ced764a17efcbef6fc9c3 100644 (file)
@@ -905,7 +905,7 @@ typedef struct
   unsigned int cb_tls_unique_len;
   unsigned char cb_tls_unique[MAX_VERIFY_DATA_SIZE];
   
-  unsigned int handshake_endtime; /* end time in seconds */
+  time_t handshake_endtime; /* end time in seconds */
   unsigned int handshake_timeout_ms; /* timeout in milliseconds */
 
   gnutls_buffer_st hb_local_data;
index b7eb092f686f92e96f118e46abdce5e7f7c4b189..f6b03b62e8c9137b907fd51c7fb62281fc4ec5e3 100644 (file)
@@ -50,7 +50,7 @@ mpz_unitstbit (mpz_t u, mp_bitcnt_t bit_index)
 {
   mp_srcptr u_ptr = u->_mp_d;
   mp_size_t size = u->_mp_size;
-  unsigned abs_size = ABS (size);
+  mp_size_t abs_size = ABS (size);
   mp_size_t limb_index = bit_index / GMP_NUMB_BITS;
   mp_srcptr p = u_ptr + limb_index;
   mp_limb_t limb;