[openssl] OpenSSL_1_1_1-stable update

tmraz at fedoraproject.org tmraz at fedoraproject.org
Wed May 20 15:57:45 UTC 2020


The branch OpenSSL_1_1_1-stable has been updated
       via  e11072908742e96a1067bb1b9609bfc27ab05835 (commit)
      from  5f10fce37b234807c39d6b1b6440585b84b68b65 (commit)


- Log -----------------------------------------------------------------
commit e11072908742e96a1067bb1b9609bfc27ab05835
Author: Tomas Mraz <tmraz at fedoraproject.org>
Date:   Tue May 19 10:51:19 2020 +0200

    Cast the unsigned char to unsigned int before shifting left
    
    This is needed to avoid automatic promotion to signed int.
    
    Fixes #11853
    
    [extended tests]
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/11857)
    
    (cherry picked from commit cbeb0bfa961412eebfbdf1e72900f05527e81e15)

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

Summary of changes:
 crypto/pem/pvkfmt.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/crypto/pem/pvkfmt.c b/crypto/pem/pvkfmt.c
index 46ed2ecdbc..e6156df533 100644
--- a/crypto/pem/pvkfmt.c
+++ b/crypto/pem/pvkfmt.c
@@ -29,10 +29,10 @@ static unsigned int read_ledword(const unsigned char **in)
 {
     const unsigned char *p = *in;
     unsigned int ret;
-    ret = *p++;
-    ret |= (*p++ << 8);
-    ret |= (*p++ << 16);
-    ret |= (*p++ << 24);
+    ret = (unsigned int)*p++;
+    ret |= (unsigned int)*p++ << 8;
+    ret |= (unsigned int)*p++ << 16;
+    ret |= (unsigned int)*p++ << 24;
     *in = p;
     return ret;
 }


More information about the openssl-commits mailing list