mirror of
https://github.com/openssl/openssl.git
synced 2024-12-09 05:51:54 +08:00
Coverity 1453629 and 1453638: Error handling issues (NEGATIVE_RETURNS)
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/9805)
This commit is contained in:
parent
f20a59cb1c
commit
4a3dd62923
@ -470,6 +470,8 @@ static int rsa_ossl_private_decrypt(int flen, const unsigned char *from,
|
||||
goto err;
|
||||
|
||||
j = BN_bn2binpad(ret, buf, num);
|
||||
if (j < 0)
|
||||
goto err;
|
||||
|
||||
switch (padding) {
|
||||
case RSA_PKCS1_PADDING:
|
||||
@ -569,6 +571,8 @@ static int rsa_ossl_public_decrypt(int flen, const unsigned char *from,
|
||||
goto err;
|
||||
|
||||
i = BN_bn2binpad(ret, buf, num);
|
||||
if (i < 0)
|
||||
goto err;
|
||||
|
||||
switch (padding) {
|
||||
case RSA_PKCS1_PADDING:
|
||||
|
Loading…
Reference in New Issue
Block a user