From b2971381e50c5421fa89201fda67a3114f815674 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Tue, 29 Aug 2017 12:02:18 +0200 Subject: [PATCH] don't be that strict regarding illegal characters in `mp_read_radix()` --- bn_mp_read_radix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bn_mp_read_radix.c b/bn_mp_read_radix.c index e02f066..12aa499 100644 --- a/bn_mp_read_radix.c +++ b/bn_mp_read_radix.c @@ -73,7 +73,7 @@ int mp_read_radix (mp_int * a, const char *str, int radix) } /* if an illegal character was found, fail. */ - if (*str != '\0') { + if (!(*str == '\0' || *str == '\r' || *str == '\n')) { mp_zero(a); return MP_VAL; }