summaryrefslogtreecommitdiffstats
path: root/CVE-2022-1122.patch
blob: 7b3f905bf5c07f633b9ef84b2f21c8b31782ac4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
diff -rupN --no-dereference openjpeg-2.4.0/src/bin/jp2/opj_decompress.c openjpeg-2.4.0-new/src/bin/jp2/opj_decompress.c
--- openjpeg-2.4.0/src/bin/jp2/opj_decompress.c	2022-03-28 22:01:04.615605223 +0200
+++ openjpeg-2.4.0-new/src/bin/jp2/opj_decompress.c	2022-03-28 22:01:04.662605454 +0200
@@ -1351,7 +1351,7 @@ int main(int argc, char **argv)
         int it_image;
         num_images = get_num_images(img_fol.imgdirpath);
 
-        dirptr = (dircnt_t*)malloc(sizeof(dircnt_t));
+        dirptr = (dircnt_t*)calloc(1, sizeof(dircnt_t));
         if (!dirptr) {
             destroy_parameters(&parameters);
             return EXIT_FAILURE;