mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
mbedcrypto_missing: Always check return values
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
13c88a2e0a
commit
9b858f57c5
@@ -104,6 +104,9 @@ int ssh_mbedcry_rand(bignum rnd, int bits, int top, int bottom)
|
|||||||
|
|
||||||
if (top == 0) {
|
if (top == 0) {
|
||||||
rc = mbedtls_mpi_set_bit(rnd, bits - 1, 0);
|
rc = mbedtls_mpi_set_bit(rnd, bits - 1, 0);
|
||||||
|
if (rc != 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (top == 1) {
|
if (top == 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user