Skip to content

Commit

Permalink
Corrected allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere authored and rubendv committed Apr 21, 2022
1 parent 967f230 commit c9eb7c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ alloc_array(Py_ssize_t count) {
if ((unsigned long long)count > (SIZE_MAX / (2 * sizeof(double))) - 1) {
return ImagingError_MemoryError();
}
xy = calloc(2 * count * sizeof(double) + 1, sizeof(double));
xy = calloc(2 * count + 1, sizeof(double));
if (!xy) {
ImagingError_MemoryError();
}
Expand Down

0 comments on commit c9eb7c9

Please sign in to comment.