Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/openssl/dist/crypto use unsigned to avoi...



details:   https://anonhg.NetBSD.org/src/rev/13f8f41e9d32
branches:  trunk
changeset: 1007376:13f8f41e9d32
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Feb 16 15:03:22 2020 +0000

description:
use unsigned to avoid undefined behavior in shifts (nisharg joshi)

diffstat:

 crypto/external/bsd/openssl/dist/crypto/md4/md4_dgst.c    |  4 ++--
 crypto/external/bsd/openssl/dist/crypto/ripemd/rmd_dgst.c |  6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r 51369af96c2b -r 13f8f41e9d32 crypto/external/bsd/openssl/dist/crypto/md4/md4_dgst.c
--- a/crypto/external/bsd/openssl/dist/crypto/md4/md4_dgst.c    Sun Feb 16 14:56:52 2020 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/md4/md4_dgst.c    Sun Feb 16 15:03:22 2020 +0000
@@ -37,10 +37,10 @@
 void md4_block_data_order(MD4_CTX *c, const void *data_, size_t num)
 {
     const unsigned char *data = data_;
-    register MD32_REG_T A, B, C, D, l;
+    register unsigned MD32_REG_T A, B, C, D, l;
 # ifndef MD32_XARRAY
     /* See comment in crypto/sha/sha_locl.h for details. */
-    MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
+    unsigned MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
         XX8, XX9, XX10, XX11, XX12, XX13, XX14, XX15;
 #  define X(i)   XX##i
 # else
diff -r 51369af96c2b -r 13f8f41e9d32 crypto/external/bsd/openssl/dist/crypto/ripemd/rmd_dgst.c
--- a/crypto/external/bsd/openssl/dist/crypto/ripemd/rmd_dgst.c Sun Feb 16 14:56:52 2020 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/ripemd/rmd_dgst.c Sun Feb 16 15:03:22 2020 +0000
@@ -36,11 +36,11 @@
 void ripemd160_block_data_order(RIPEMD160_CTX *ctx, const void *p, size_t num)
 {
     const unsigned char *data = p;
-    register MD32_REG_T A, B, C, D, E;
-    MD32_REG_T a, b, c, d, e, l;
+    register unsigned MD32_REG_T A, B, C, D, E;
+    unsigned MD32_REG_T a, b, c, d, e, l;
 # ifndef MD32_XARRAY
     /* See comment in crypto/sha/sha_locl.h for details. */
-    MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
+    unsigned MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
         XX8, XX9, XX10, XX11, XX12, XX13, XX14, XX15;
 #  define X(i)   XX##i
 # else



Home | Main Index | Thread Index | Old Index