Projects
openEuler:24.03:SP1:Everything:64G
openjpeg2
_service:tar_scm:backport-CVE-2021-3575.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-CVE-2021-3575.patch of Package openjpeg2
From 7bd884f8750892de4f50bf4642fcfbe7011c6bdf Mon Sep 17 00:00:00 2001 From: Even Rouault <even.rouault@spatialys.com> Date: Sun, 18 Feb 2024 17:02:25 +0100 Subject: [PATCH] opj_decompress: fix off-by-one read heap-buffer-overflow in sycc420_to_rgb() when x0 and y0 are odd (CVE-2021-3575, fixes #1347) Reference:https://github.com/uclouvain/openjpeg/commit/7bd884f8750892de4f50bf4642fcfbe7011c6bdf Conflict:NA --- src/bin/common/color.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/bin/common/color.c b/src/bin/common/color.c index 27f15f137..ae5d648da 100644 --- a/src/bin/common/color.c +++ b/src/bin/common/color.c @@ -358,7 +358,15 @@ static void sycc420_to_rgb(opj_image_t *img) if (i < loopmaxh) { size_t j; - for (j = 0U; j < (maxw & ~(size_t)1U); j += 2U) { + if (offx > 0U) { + sycc_to_rgb(offset, upb, *y, 0, 0, r, g, b); + ++y; + ++r; + ++g; + ++b; + } + + for (j = 0U; j < (loopmaxw & ~(size_t)1U); j += 2U) { sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b); ++y; @@ -375,7 +383,7 @@ static void sycc420_to_rgb(opj_image_t *img) ++cb; ++cr; } - if (j < maxw) { + if (j < loopmaxw) { sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b); } }
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2