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(); }