mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Corrected allocation
This commit is contained in:
parent
fd2b07c454
commit
fe32501922
|
@ -57,7 +57,7 @@ alloc_array(Py_ssize_t count) {
|
||||||
if ((unsigned long long)count > (SIZE_MAX / (2 * sizeof(double))) - 1) {
|
if ((unsigned long long)count > (SIZE_MAX / (2 * sizeof(double))) - 1) {
|
||||||
return ImagingError_MemoryError();
|
return ImagingError_MemoryError();
|
||||||
}
|
}
|
||||||
xy = calloc(2 * count * sizeof(double) + 1, sizeof(double));
|
xy = calloc(2 * count + 1, sizeof(double));
|
||||||
if (!xy) {
|
if (!xy) {
|
||||||
ImagingError_MemoryError();
|
ImagingError_MemoryError();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user