From: Mark Wooding Date: Sun, 10 Nov 2019 13:23:49 +0000 (+0000) Subject: mp.c: Fix crash converting elliptic curve point-at-infinity to integer. X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/commitdiff_plain/46c13d7718d244f8ac59fbfc1c826d4d12ef4a39 mp.c: Fix crash converting elliptic curve point-at-infinity to integer. --- diff --git a/mp.c b/mp.c index e9268e5..7c9146c 100644 --- a/mp.c +++ b/mp.c @@ -211,6 +211,7 @@ mp *tomp(PyObject *o) return (MP_COPY(PFILT_F(o)->m)); else if (ECPT_PYCHECK(o)) { ec p = EC_INIT; + if (EC_ATINF(ECPT_P(o))) return (0); getecptout(&p, o); x = MP_COPY(p.x); EC_DESTROY(&p);