chiark
/
gitweb
/
~mdw
/
catacomb-python
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
buffer.c, ec.c: Fix required size for EC `buffer' encoding.
[catacomb-python]
/
ec.c
diff --git
a/ec.c
b/ec.c
index 30dc50c8fe6c449600f2244f28b6d51126f238fd..ef5d855a9c7071dfc69fd947a4a9e14da96305fe 100644
(file)
--- a/
ec.c
+++ b/
ec.c
@@
-252,7
+252,7
@@
static PyObject *epmeth_tobuf(PyObject *me, PyObject *arg)
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);