mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-03 13:14:27 +03:00
Initialize coordinates to zero
This commit is contained in:
parent
89d0d38796
commit
1e092419b6
|
@ -90,6 +90,7 @@ def test_path_odd_number_of_coordinates():
|
|||
[
|
||||
([0, 1, 2, 3], (0.0, 1.0, 2.0, 3.0)),
|
||||
([3, 2, 1, 0], (1.0, 0.0, 3.0, 2.0)),
|
||||
(1, (0.0, 0.0, 0.0, 0.0)),
|
||||
],
|
||||
)
|
||||
def test_getbbox(coords, expected):
|
||||
|
|
|
@ -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 = malloc(2 * count * sizeof(double) + 1);
|
||||
xy = calloc(2 * count * sizeof(double) + 1, sizeof(double));
|
||||
if (!xy) {
|
||||
ImagingError_MemoryError();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user