mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
mbedcrypto_missing: Always check return values
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 9b858f57c5)
This commit is contained in:
committed by
Andreas Schneider
parent
46105f4aa6
commit
226d2a16b0
@@ -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