From 6788e8f95753be2b13b1b80458d026e6cb3eb9f0 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Wed, 26 Oct 2022 11:11:30 -0700 Subject: [PATCH] Fix malloc in _imagingft.c:font_setvaraxes --- src/_imagingft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_imagingft.c b/src/_imagingft.c index 8f19b763c5c..4c3a37fb2b4 100644 --- a/src/_imagingft.c +++ b/src/_imagingft.c @@ -1179,7 +1179,7 @@ font_setvaraxes(FontObject *self, PyObject *args) { } num_coords = PyObject_Length(axes); - coords = malloc(2 * sizeof(coords)); + coords = (FT_Fixed*)malloc(num_coords * sizeof(FT_Fixed)); if (coords == NULL) { return PyErr_NoMemory(); }