[openssl-commits] [openssl] OpenSSL_1_0_2-stable update

Rich Salz rsalz at openssl.org
Thu Jul 28 15:49:16 UTC 2016


The branch OpenSSL_1_0_2-stable has been updated
       via  cdddc96d5defb418457b91817650971311816298 (commit)
      from  68bc6b7a36be4b635adb8d6ac0c849c51dcd8543 (commit)


- Log -----------------------------------------------------------------
commit cdddc96d5defb418457b91817650971311816298
Author: Rich Salz <rsalz at openssl.org>
Date:   Wed Jul 27 11:09:07 2016 -0400

    Add missing casts.
    
    Reviewed-by: Dr. Stephen Henson <steve at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 apps/s_client.c | 2 +-
 ssl/s3_srvr.c   | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/apps/s_client.c b/apps/s_client.c
index ec130dc..b909c9a 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -273,7 +273,7 @@ static unsigned int psk_client_cb(SSL *ssl, const char *hint, char *identity,
                    psk_key);
         return 0;
     }
-    if (key_len > max_psk_len) {
+    if ((unsigned long)key_len > (unsigned long)max_psk_len) {
         BIO_printf(bio_err,
                    "psk buffer of callback is too small (%d) for key (%ld)\n",
                    max_psk_len, key_len);
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c
index c95d610..b5eff98 100644
--- a/ssl/s3_srvr.c
+++ b/ssl/s3_srvr.c
@@ -980,7 +980,8 @@ int ssl3_get_client_hello(SSL *s)
 
         session_length = *(p + SSL3_RANDOM_SIZE);
 
-        if (SSL3_RANDOM_SIZE + session_length + 1 >= (d + n) - p) {
+        if (SSL3_RANDOM_SIZE + session_length + 1
+                >= (unsigned int)((d + n) - p)) {
             al = SSL_AD_DECODE_ERROR;
             SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT);
             goto f_err;
@@ -1061,7 +1062,7 @@ int ssl3_get_client_hello(SSL *s)
         }
         cookie_len = *(p++);
 
-        if ((d + n ) - p < cookie_len) {
+        if ((unsigned int)((d + n ) - p) < cookie_len) {
             al = SSL_AD_DECODE_ERROR;
             SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT);
             goto f_err;


More information about the openssl-commits mailing list