Source-Changes-HG archive

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

[src/trunk]: src/crypto/external/bsd Match new openssl HMAC_CTX_new better an...



details:   https://anonhg.NetBSD.org/src/rev/81841879d162
branches:  trunk
changeset: 829553:81841879d162
user:      maya <maya%NetBSD.org@localhost>
date:      Mon Feb 05 21:12:14 2018 +0000

description:
Match new openssl HMAC_CTX_new better and zero out all the fields.

diffstat:

 crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h |  2 +-
 crypto/external/bsd/openssl/dist/crypto/hmac/hmac.h     |  2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 7e2fb8182811 -r 81841879d162 crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h
--- a/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h   Mon Feb 05 20:27:06 2018 +0000
+++ b/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h   Mon Feb 05 21:12:14 2018 +0000
@@ -105,7 +105,7 @@
 #if OPENSSL_VERSION_NUMBER >= 0x10100000L
 static inline HMAC_CTX *HMAC_CTX_new(void)
 {
-       HMAC_CTX *ctx = malloc(sizeof(*ctx));
+       HMAC_CTX *ctx = calloc(1, sizeof(*ctx));
        if (ctx == NULL)
                return NULL;
        HMAC_CTX_init(ctx);
diff -r 7e2fb8182811 -r 81841879d162 crypto/external/bsd/openssl/dist/crypto/hmac/hmac.h
--- a/crypto/external/bsd/openssl/dist/crypto/hmac/hmac.h       Mon Feb 05 20:27:06 2018 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/hmac/hmac.h       Mon Feb 05 21:12:14 2018 +0000
@@ -105,7 +105,7 @@
 #ifdef OPENSSL_VERSION_NUMBER >= 0x10100000L
 static inline HMAC_CTX *HMAC_CTX_new(void)
 {
-       HMAC_CTX *ctx = malloc(sizeof(*ctx));
+       HMAC_CTX *ctx = calloc(1, sizeof(*ctx));
        if (ctx == NULL)
                return NULL;
        HMAC_CTX_init(ctx);



Home | Main Index | Thread Index | Old Index