Fix Coverity 1547856: memset() uses only the lowest byte of c
authorTomas Mraz <tomas@openssl.org>
Thu, 19 Oct 2023 06:37:47 +0000 (08:37 +0200)
committerMatt Caswell <matt@openssl.org>
Tue, 24 Oct 2023 13:23:50 +0000 (14:23 +0100)
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/22430)

test/rsa_test.c

index 88c2f6d25d8645f6a416c91e10b0a9bfd6e68940..2d9f6aa3a3f877124782ba1a11ab0faa4fe79377 100644 (file)
@@ -484,7 +484,7 @@ static int test_EVP_rsa_legacy_key(void)
     0x85, 0x20, 0x4f, 0x35, 0x02, 0xfa, 0xda, 0x14, 0x77, 0xfa, 0x08, 0x34,
     0x60, 0xc7, 0x93, 0x72, 0xdc, 0xc4, 0x18, 0x70, 0xc1 };
 
-    memset(msgbuf, 0xdeadbeef, 64);
+    memset(msgbuf, 0xef, 64);
 
     ret = (TEST_ptr((p = BN_bin2bn(p_data, sizeof(p_data), NULL)))
            && TEST_ptr((q = BN_bin2bn(q_data, sizeof(q_data), NULL)))