[openssl] master update

Dr. Paul Dale pauli at openssl.org
Wed Dec 8 11:03:25 UTC 2021


The branch master has been updated
       via  f4f77c2d9756cee12875397276799a93f057d412 (commit)
      from  684326d3bd3131debcdc410790e8dcf16f96103f (commit)


- Log -----------------------------------------------------------------
commit f4f77c2d9756cee12875397276799a93f057d412
Author: Gerd Hoffmann <kraxel at redhat.com>
Date:   Tue Dec 7 10:22:38 2021 +0100

    rename MIN() macro
    
    MIN is a rather generic name and results in a name clash when trying to
    port tianocore over to openssl 3.0.  Use the usual ossl prefix and
    rename the macro to ossl_min() to solve this.
    
    CLA: trivial
    
    Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/17219)

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

Summary of changes:
 providers/implementations/kdfs/kbkdf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/providers/implementations/kdfs/kbkdf.c b/providers/implementations/kdfs/kbkdf.c
index a81cc6e0c0..22fc7b86ad 100644
--- a/providers/implementations/kdfs/kbkdf.c
+++ b/providers/implementations/kdfs/kbkdf.c
@@ -46,7 +46,7 @@
 
 #include "e_os.h"
 
-#define MIN(a, b) ((a) < (b)) ? (a) : (b)
+#define ossl_min(a, b) ((a) < (b)) ? (a) : (b)
 
 typedef enum {
     COUNTER = 0,
@@ -197,7 +197,7 @@ static int derive(EVP_MAC_CTX *ctx_init, kbkdf_mode mode, unsigned char *iv,
             goto done;
 
         to_write = ko_len - written;
-        memcpy(ko + written, k_i, MIN(to_write, h));
+        memcpy(ko + written, k_i, ossl_min(to_write, h));
         written += h;
 
         k_i_len = h;


More information about the openssl-commits mailing list