don't be that strict regarding illegal characters in mp_read_radix()
This commit is contained in:
parent
ba95ef76e0
commit
b2971381e5
@ -73,7 +73,7 @@ int mp_read_radix (mp_int * a, const char *str, int radix)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* if an illegal character was found, fail. */
|
/* if an illegal character was found, fail. */
|
||||||
if (*str != '\0') {
|
if (!(*str == '\0' || *str == '\r' || *str == '\n')) {
|
||||||
mp_zero(a);
|
mp_zero(a);
|
||||||
return MP_VAL;
|
return MP_VAL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user