[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Sun Feb 14 10:39:39 UTC 2016


The branch master has been updated
       via  59d9bb591c950062ef3721f6b58fddbaae910f2a (commit)
      from  ba327ade803fccb34a4bd4f5803efb33e22dd767 (commit)


- Log -----------------------------------------------------------------
commit 59d9bb591c950062ef3721f6b58fddbaae910f2a
Author: Richard Levitte <levitte at openssl.org>
Date:   Sun Feb 14 11:16:37 2016 +0100

    Make sure a socklen_t can compare with a sizeof() result
    
    Most of the times, it seems that socklen_t is unsigned.
    Unfortunately, this isn't always the case, and it doesn't compare with
    a size_t without warning.
    
    A cast resolves the issue.
    
    Reviewed-by: Kurt Roeckx <kurt at openssl.org>

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

Summary of changes:
 crypto/bio/b_sock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c
index 4ae08d2..eece85b 100644
--- a/crypto/bio/b_sock.c
+++ b/crypto/bio/b_sock.c
@@ -432,7 +432,7 @@ int BIO_sock_info(int sock,
                 BIOerr(BIO_F_BIO_SOCK_INFO, BIO_R_GETSOCKNAME_ERROR);
                 return 0;
             }
-            if (addr_len > sizeof(*info->addr)) {
+            if ((size_t)addr_len > sizeof(*info->addr)) {
                 BIOerr(BIO_F_BIO_SOCK_INFO, BIO_R_GETSOCKNAME_TRUNCATED_ADDRESS);
                 return 0;
             }


More information about the openssl-commits mailing list