buffer.c, ec.c: Fix required size for EC `buffer' encoding.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 21 Nov 2019 19:53:22 +0000 (19:53 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 25 Nov 2019 17:31:22 +0000 (17:31 +0000)
commitf52568b48a26bce7f62c3c03402e9f705f16332b
treea3d974e9e482aa05d39abbf4936625204fbb6288
parentd050e0fa0f1cad4b77fc11240990068d4a13da49
buffer.c, ec.c: Fix required size for EC `buffer' encoding.

The problem is zero coordinates: the point at infinity is encoded as a
zero length word, so zero coordinates must be encoded as a single zero
byte, preceded by a length word of 1 -- which overruns the output buffer
provided, unless we take special care, which we haven't.
buffer.c
ec.c