RSA: avoid dereferencing possibly-NULL parameter in initializers
authorBenjamin Kaduk <bkaduk@akamai.com>
Thu, 11 Feb 2021 23:52:54 +0000 (15:52 -0800)
committerShane Lontis <shane.lontis@oracle.com>
Mon, 15 Feb 2021 04:12:31 +0000 (14:12 +1000)
commit93e43f4c47ea3ec3b916c0a7fcd4912f47460416
tree1292d6f99ae1238931573e3e996e8872178fab39
parent63ae8476796510c15163c9bd18998ccef6c1de16
RSA: avoid dereferencing possibly-NULL parameter in initializers

Fix CID 1472835: the explicit NULL check for prsactx is useless when
we have already dereferenced it in the initializers.

Move the actual initialization to the function body to get the
logic sequenced properly.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14160)
providers/implementations/signature/rsa.c