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:
Jakub Jelen
2019-12-16 16:52:45 +01:00
committed by Andreas Schneider
parent 46105f4aa6
commit 226d2a16b0

View File

@@ -104,6 +104,9 @@ int ssh_mbedcry_rand(bignum rnd, int bits, int top, int bottom)
if (top == 0) {
rc = mbedtls_mpi_set_bit(rnd, bits - 1, 0);
if (rc != 0) {
return 0;
}
}
if (top == 1) {