mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Merge pull request #6503 from SparkiDev/mp_test_tfm_mips
TFM: fix big endian reading a zero length buffer
This commit is contained in:
@ -3864,6 +3864,10 @@ int fp_read_unsigned_bin(fp_int *a, const unsigned char *b, int c)
|
|||||||
/* zero the int */
|
/* zero the int */
|
||||||
fp_zero (a);
|
fp_zero (a);
|
||||||
|
|
||||||
|
if (c == 0) {
|
||||||
|
return FP_OKAY;
|
||||||
|
}
|
||||||
|
|
||||||
/* if input b excess max, then truncate */
|
/* if input b excess max, then truncate */
|
||||||
if (c > 0 && (word32)c > maxC) {
|
if (c > 0 && (word32)c > maxC) {
|
||||||
int excess = (c - maxC);
|
int excess = (c - maxC);
|
||||||
|
Reference in New Issue
Block a user