fix CVE-2022-1122
This commit is contained in:
parent
d8e3e9be49
commit
e74ba6e2c9
29
backport-CVE-2022-1122.patch
Normal file
29
backport-CVE-2022-1122.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 0afbdcf3e6d0d2bd2e16a0c4d513ee3cf86e460d Mon Sep 17 00:00:00 2001
|
||||||
|
From: xiaoxiaoafeifei <lliangliang2007@163.com>
|
||||||
|
Date: Wed, 14 Jul 2021 09:35:13 +0800
|
||||||
|
Subject: [PATCH] Fix segfault in src/bin/jp2/opj_decompress.c due to
|
||||||
|
uninitialized pointer (fixes #1368) (#1369)
|
||||||
|
|
||||||
|
Conflict:NA
|
||||||
|
Reference:https://github.com/uclouvain/openjpeg/commit/0afbdcf3e6d0d2bd2e16a0c4d513ee3cf86e460d
|
||||||
|
|
||||||
|
---
|
||||||
|
src/bin/jp2/opj_decompress.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/bin/jp2/opj_decompress.c b/src/bin/jp2/opj_decompress.c
|
||||||
|
index 38e273d..6c517a8 100644
|
||||||
|
--- a/src/bin/jp2/opj_decompress.c
|
||||||
|
+++ b/src/bin/jp2/opj_decompress.c
|
||||||
|
@@ -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(¶meters);
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: openjpeg2
|
Name: openjpeg2
|
||||||
Version: 2.4.0
|
Version: 2.4.0
|
||||||
Release: 5
|
Release: 6
|
||||||
Summary: C-Library for JPEG 2000
|
Summary: C-Library for JPEG 2000
|
||||||
License: BSD and MIT
|
License: BSD and MIT
|
||||||
URL: https://github.com/uclouvain/openjpeg
|
URL: https://github.com/uclouvain/openjpeg
|
||||||
@ -10,6 +10,7 @@ Patch0: openjpeg2_opj2.patch
|
|||||||
Patch1: heap-buffer-overflow.patch
|
Patch1: heap-buffer-overflow.patch
|
||||||
|
|
||||||
Patch6000: backport-CVE-2021-29338.patch
|
Patch6000: backport-CVE-2021-29338.patch
|
||||||
|
Patch6001: backport-CVE-2022-1122.patch
|
||||||
|
|
||||||
BuildRequires: cmake gcc-c++ make zlib-devel libpng-devel libtiff-devel lcms2-devel doxygen java-devel xerces-j2
|
BuildRequires: cmake gcc-c++ make zlib-devel libpng-devel libtiff-devel lcms2-devel doxygen java-devel xerces-j2
|
||||||
|
|
||||||
@ -99,6 +100,9 @@ mv %{buildroot}%{_mandir}/man1/opj_dump.1 %{buildroot}%{_mandir}/man1/opj2_dump.
|
|||||||
%{_bindir}/opj2_dump
|
%{_bindir}/opj2_dump
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 16 2022 dongyuzhen <dongyuzhen@h-partners.com> - 2.4.0-6
|
||||||
|
- fix CVE-2022-1122
|
||||||
|
|
||||||
* Tue Apr 12 2022 dongyuzhen <dongyuzhen@h-partners.com> - 2.4.0-5
|
* Tue Apr 12 2022 dongyuzhen <dongyuzhen@h-partners.com> - 2.4.0-5
|
||||||
- fix the issue of opj2_compress/opj2_decompress don't work with png/tiff images
|
- fix the issue of opj2_compress/opj2_decompress don't work with png/tiff images
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user