mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Merge pull request #3844 from SparkiDev/mp_read_radix_fail
MP small: read radix set result to 0 on all errors
This commit is contained in:
@ -5229,9 +5229,11 @@ int mp_read_radix (mp_int * a, const char *str, int radix)
|
||||
*/
|
||||
if (y < radix) {
|
||||
if ((res = mp_mul_d (a, (mp_digit) radix, a)) != MP_OKAY) {
|
||||
mp_zero(a);
|
||||
return res;
|
||||
}
|
||||
if ((res = mp_add_d (a, (mp_digit) y, a)) != MP_OKAY) {
|
||||
mp_zero(a);
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user