Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
From 839936aa33eb8899bbbd80fda02796bb65068951 Mon Sep 17 00:00:00 2001
|
||||
From: Even Rouault <even.rouault@spatialys.com>
|
||||
Date: Sun, 5 Apr 2026 13:25:27 +0200
|
||||
Subject: [PATCH] opj_pi_initialise_encode() (write code path): avoid potential
|
||||
integer overflow leading to insufficient memory allocation
|
||||
|
||||
Fixes #1619
|
||||
|
||||
CVE: CVE-2026-6192
|
||||
Upstream: https://github.com/uclouvain/openjpeg/commit/839936aa33eb8899bbbd80fda02796bb65068951
|
||||
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
|
||||
---
|
||||
src/lib/openjp2/pi.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/lib/openjp2/pi.c b/src/lib/openjp2/pi.c
|
||||
index 15ac33142..4abb87af2 100644
|
||||
--- a/src/lib/openjp2/pi.c
|
||||
+++ b/src/lib/openjp2/pi.c
|
||||
@@ -1694,9 +1694,12 @@ opj_pi_iterator_t *opj_pi_initialise_encode(const opj_image_t *p_image,
|
||||
l_current_pi = l_pi;
|
||||
|
||||
/* memory allocation for include*/
|
||||
- l_current_pi->include_size = l_tcp->numlayers * l_step_l;
|
||||
- l_current_pi->include = (OPJ_INT16*) opj_calloc(l_current_pi->include_size,
|
||||
- sizeof(OPJ_INT16));
|
||||
+ l_current_pi->include = NULL;
|
||||
+ if (l_step_l <= UINT_MAX / l_tcp->numlayers) {
|
||||
+ l_current_pi->include_size = l_tcp->numlayers * l_step_l;
|
||||
+ l_current_pi->include = (OPJ_INT16*) opj_calloc(l_current_pi->include_size,
|
||||
+ sizeof(OPJ_INT16));
|
||||
+ }
|
||||
if (!l_current_pi->include) {
|
||||
opj_free(l_tmp_data);
|
||||
opj_free(l_tmp_ptr);
|
||||
7
package/openjpeg/Config.in
Normal file
7
package/openjpeg/Config.in
Normal file
@@ -0,0 +1,7 @@
|
||||
config BR2_PACKAGE_OPENJPEG
|
||||
bool "openjpeg"
|
||||
help
|
||||
The OpenJPEG library is an open-source JPEG 2000 codec
|
||||
written in C.
|
||||
|
||||
http://www.openjpeg.org
|
||||
3
package/openjpeg/openjpeg.hash
Normal file
3
package/openjpeg/openjpeg.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally computed:
|
||||
sha256 a695fbe19c0165f295a8531b1e4e855cd94d0875d2f88ec4b61080677e27188a openjpeg-2.5.4.tar.gz
|
||||
sha256 a6af136f3e15038a666b61f376612a07d9a4e48cb7c01adbf3e33b3f14ab49b6 LICENSE
|
||||
28
package/openjpeg/openjpeg.mk
Normal file
28
package/openjpeg/openjpeg.mk
Normal file
@@ -0,0 +1,28 @@
|
||||
################################################################################
|
||||
#
|
||||
# openjpeg
|
||||
#
|
||||
################################################################################
|
||||
|
||||
OPENJPEG_VERSION = 2.5.4
|
||||
OPENJPEG_SITE = $(call github,uclouvain,openjpeg,v$(OPENJPEG_VERSION))
|
||||
OPENJPEG_LICENSE = BSD-2-Clause
|
||||
OPENJPEG_LICENSE_FILES = LICENSE
|
||||
OPENJPEG_CPE_ID_VENDOR = uclouvain
|
||||
OPENJPEG_INSTALL_STAGING = YES
|
||||
|
||||
# 0001-opj-pi-initialise-encode-avoid-potential-integer-overflow-leading-to-insufficient-memory-allocation.patch
|
||||
OPENJPEG_IGNORE_CVES += CVE-2026-6192
|
||||
|
||||
OPENJPEG_DEPENDENCIES += $(if $(BR2_PACKAGE_ZLIB),zlib)
|
||||
OPENJPEG_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBPNG),libpng)
|
||||
OPENJPEG_DEPENDENCIES += $(if $(BR2_PACKAGE_TIFF),tiff)
|
||||
OPENJPEG_DEPENDENCIES += $(if $(BR2_PACKAGE_LCMS2),lcms2)
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
||||
OPENJPEG_CONF_OPTS += -DOPJ_USE_THREAD=ON
|
||||
else
|
||||
OPENJPEG_CONF_OPTS += -DOPJ_USE_THREAD=OFF
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user