From 0e7cb3ec59de876bd32dcb86606351b2baa61083 Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Fri, 24 Jan 2020 15:01:21 -0500 Subject: bugfix --- pyisda/curve.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyisda/curve.pyx b/pyisda/curve.pyx index 6456477..ab74fde 100644 --- a/pyisda/curve.pyx +++ b/pyisda/curve.pyx @@ -707,7 +707,7 @@ cdef class SpreadCurve(Curve): SpreadCurve instance = SpreadCurve.__new__(SpreadCurve) const unsigned char* cursor const char* src - char* dst = malloc(500) + char* dst TCurve* curve = malloc(sizeof(TCurve)) size_t size Py_buffer* py_buf @@ -719,7 +719,7 @@ cdef class SpreadCurve(Curve): size = py_buf.len else: src = state - size = PyBytes_GET_SIZE(src) + size = PyBytes_GET_SIZE(state) with nogil: if compressed: dst = malloc(500) -- cgit v1.2.3-70-g09d2