forked from wolfSSL/wolfssl
Merge pull request #3359 from ejohnstown/tfm-read-radix-16
TFM Read Radix 16 OOB Read
This commit is contained in:
@ -5296,13 +5296,13 @@ static int fp_read_radix_16(fp_int *a, const char *str)
|
|||||||
else
|
else
|
||||||
return FP_VAL;
|
return FP_VAL;
|
||||||
|
|
||||||
|
k += j == DIGIT_BIT;
|
||||||
|
j &= DIGIT_BIT - 1;
|
||||||
if (k >= FP_SIZE)
|
if (k >= FP_SIZE)
|
||||||
return FP_VAL;
|
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;
|
|
||||||
j &= DIGIT_BIT - 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a->used = k + 1;
|
a->used = k + 1;
|
||||||
|
Reference in New Issue
Block a user