]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix parentheses in bn_cp_64 macro
authorNorbert Pocs <norbertp@openssl.org>
Fri, 5 Jun 2026 10:19:56 +0000 (12:19 +0200)
committerNorbert Pocs <norbertp@openssl.org>
Wed, 10 Jun 2026 13:24:43 +0000 (15:24 +0200)
Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Milan Broz <mbroz@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Wed Jun 10 13:24:46 2026
(Merged from https://github.com/openssl/openssl/pull/31386)

crypto/bn/bn_nist.c

index 38068aae698e1e14b92b5e1604b74d53855e333d..b820ef74869ba75a58f7b3ec792972b52626d742 100644 (file)
@@ -281,7 +281,7 @@ static void nist_cp_bn(BN_ULONG *dst, const BN_ULONG *src, int top)
 }
 
 #if BN_BITS2 == 64
-#define bn_cp_64(to, n, from, m) (to)[n] = (m >= 0) ? ((from)[m]) : 0
+#define bn_cp_64(to, n, from, m) ((to)[n] = ((m) >= 0) ? ((from)[m]) : 0)
 #define bn_64_set_0(to, n) (to)[n] = (BN_ULONG)0
 /*
  * two following macros are implemented under assumption that they
@@ -309,7 +309,7 @@ static void nist_cp_bn(BN_ULONG *dst, const BN_ULONG *src, int top)
         bn_32_set_0(to, (n) * 2);     \
         bn_32_set_0(to, (n) * 2 + 1); \
     }
-#define bn_cp_32(to, n, from, m) (to)[n] = (m >= 0) ? ((from)[m]) : 0
+#define bn_cp_32(to, n, from, m) ((to)[n] = ((m) >= 0) ? ((from)[m]) : 0)
 #define bn_32_set_0(to, n) (to)[n] = (BN_ULONG)0;
 #if defined(_WIN32) && !defined(__GNUC__)
 #define NIST_INT64 __int64