Fix malloc in _imagingft.c:font_setvaraxes

This commit is contained in:
Christoph Gohlke 2022-10-26 11:11:30 -07:00 committed by GitHub
parent 8ed46cd568
commit 6788e8f957
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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