if (EC_ATINF(&p))
n = 2;
else
- n = mp_octets(p.x) + mp_octets(p.y) + 4;
+ n = mp_octets(p.x) + mp_octets(p.y) + 6;
rc = bytestring_pywrap(0, n);
buf_init(&b, PyString_AS_STRING(rc), n);
buf_putec(&b, &p);
getecptout(p, x);
goto fix;
} else if (PyString_Check(x)) {
- if (PyObject_AsReadBuffer(x, &q, 0))
+ if (PyObject_AsReadBuffer(x, &q, &n))
goto end;
qd.p = q;
qd.e = 0;