From c34cefb576c6a4ba5acd322dd2cd06b230595d1c Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Tue, 25 Jun 2019 14:41:06 -0700 Subject: [PATCH] Use ssize_t to store number of elements in buffer --- src/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/path.c b/src/path.c index eb1e065f9..3eaacb33b 100644 --- a/src/path.c +++ b/src/path.c @@ -133,7 +133,7 @@ PyPath_Flatten(PyObject* data, double **pxy) /* Assume the buffer contains floats */ Py_buffer buffer; if (PyImaging_GetBuffer(data, &buffer) == 0) { - int n = buffer.len / (2 * sizeof(float)); + n = buffer.len / (2 * sizeof(float)); float *ptr = (float*) buffer.buf; xy = alloc_array(n); if (!xy)