]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
separate intval into separate variable in OSSL_PARAMS
authorNeil Horman <nhorman@openssl.org>
Thu, 20 Feb 2025 14:15:26 +0000 (09:15 -0500)
committerNeil Horman <nhorman@openssl.org>
Sat, 22 Feb 2025 19:29:56 +0000 (14:29 -0500)
construction of int params holds a pointer to an int rather than an int
value, so we need to use separate variables when constructing separate
int params.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26851)

fuzz/slh-dsa.c

index 6ced4561653cf39dbb5362cb676bc283e86b0556..d2b4a438ea60c18d486cda7ed2c658d86d1aaf62 100644 (file)
@@ -318,7 +318,7 @@ static void slh_dsa_sign_verify(uint8_t **buf, size_t *len, void *key1,
     unsigned char *sig = NULL;
     OSSL_PARAM params[4];
     int paramidx = 0;
-    int intval;
+    int intval1, intval2;
     int expect_init_rc = 1;
 
     *buf = consume_uint8t(*buf, len, &selector);
@@ -351,15 +351,15 @@ static void slh_dsa_sign_verify(uint8_t **buf, size_t *len, void *key1,
                                                                msg, msg_len);
 
     if (selector & 0x2) {
-        intval = selector & 0x4;
+        intval1 = selector & 0x4;
         params[paramidx++] = OSSL_PARAM_construct_int(OSSL_SIGNATURE_PARAM_MESSAGE_ENCODING,
-                                                      &intval);
+                                                      &intval1);
     }
 
     if (selector & 0x8) {
-        intval = selector & 0x10;
+        intval2 = selector & 0x10;
         params[paramidx++] = OSSL_PARAM_construct_int(OSSL_SIGNATURE_PARAM_DETERMINISTIC,
-                                                      &intval);
+                                                      &intval2);
     }
 
     params[paramidx] = OSSL_PARAM_construct_end();