File 028-CVE-2022-22815.patch of Package python-Pillow

From 1e092419b6806495c683043ab3feb6ce264f3b9c Mon Sep 17 00:00:00 2001
From: Andrew Murray <radarhere@users.noreply.github.com>
Date: Mon, 6 Dec 2021 22:24:19 +1100
Subject: [PATCH] Initialize coordinates to zero

---
 Tests/test_imagepath.py | 1 +
 src/path.c              | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/path.c b/src/path.c
index 4764c58aa0..64c767cb88 100644
--- a/src/path.c
+++ b/src/path.c
@@ -62,7 +62,7 @@ alloc_array(Py_ssize_t count)
         PyErr_NoMemory();
         return NULL;
     }
-    xy = malloc(2 * count * sizeof(double) + 1);
+    xy = calloc(2 * count * sizeof(double) + 1, sizeof(double));
     if (!xy)
         PyErr_NoMemory();
     return xy;
openSUSE Build Service is sponsored by