mirror of https://github.com/wolfSSL/wolfssl.git
Fix OOB in fp_read_radix_16
parent
ff08a01f94
commit
d21d95c629
|
@ -4802,6 +4802,9 @@ static int fp_read_radix_16(fp_int *a, const char *str)
|
||||||
else
|
else
|
||||||
return FP_VAL;
|
return FP_VAL;
|
||||||
|
|
||||||
|
if (k >= FP_SIZE)
|
||||||
|
return FP_VAL;
|
||||||
|
|
||||||
a->dp[k] |= ((fp_digit)ch) << j;
|
a->dp[k] |= ((fp_digit)ch) << j;
|
||||||
j += 4;
|
j += 4;
|
||||||
k += j == DIGIT_BIT;
|
k += j == DIGIT_BIT;
|
||||||
|
|
Loading…
Reference in New Issue