Skip to content

Commit

Permalink
Fix Coverity 1547856: memset() uses only the lowest byte of c
Browse files Browse the repository at this point in the history
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from #22430)

(cherry picked from commit 0bf1814)
  • Loading branch information
t8m authored and mattcaswell committed Oct 24, 2023
1 parent 380ae1b commit 742e766
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/rsa_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 742e766

Please sign in to comment.