Skip to content

Commit

Permalink
Fix malloc in _imagingft.c:font_setvaraxes
Browse files Browse the repository at this point in the history
  • Loading branch information
cgohlke committed Oct 26, 2022
1 parent 8ed46cd commit 6788e8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/_imagingft.c
Expand Up @@ -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();
}
Expand Down

0 comments on commit 6788e8f

Please sign in to comment.