Merge pull request #3180 from embhorn/zd10697

Fix OOB in fp_read_radix_16
This commit is contained in:
toddouska 2020-08-03 16:44:01 -07:00 committed by GitHub
commit 0df2da47ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4802,6 +4802,9 @@ static int fp_read_radix_16(fp_int *a, const char *str)
else
return FP_VAL;
if (k >= FP_SIZE)
return FP_VAL;
a->dp[k] |= ((fp_digit)ch) << j;
j += 4;
k += j == DIGIT_BIT;