mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-10-15 06:17:16 +00:00
libheif: patch CVE-2026-32739
Backport commit identified by Debian[1] Details: https://nvd.nist.gov/vuln/detail/cve-2026-32739 [1]https://security-tracker.debian.org/tracker/CVE-2026-32739 Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com> Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
This commit is contained in:
1 parent
18e20ab7d2
commit
6bc5abde11
2 files changed
+55
No files matched your search
@@ -0,0 +1,54 @@
|
||||
From 1c6fde64e37efa6031a6be2318dac62dfb38f370 Mon Sep 17 00:00:00 2001
|
||||
From: Dirk Farin <dirk.farin@gmail.com>
|
||||
Date: Fri, 13 Mar 2026 23:39:33 +0100
|
||||
Subject: [PATCH] fix infinite loop for sequences with variable frame-rate
|
||||
|
||||
CVE: CVE-2026-32739
|
||||
Upstream-Status: Backport [https://github.com/strukturag/libheif/commit/723b58d6ca329b2743822951aeaf3299c7410448]
|
||||
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
|
||||
---
|
||||
libheif/sequences/seq_boxes.cc | 22 ++++++++--------------
|
||||
1 file changed, 8 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/libheif/sequences/seq_boxes.cc b/libheif/sequences/seq_boxes.cc
|
||||
index 91865848..39c2e8f4 100644
|
||||
--- a/libheif/sequences/seq_boxes.cc
|
||||
+++ b/libheif/sequences/seq_boxes.cc
|
||||
@@ -621,14 +621,11 @@ Error Box_stts::write(StreamWriter& writer) const
|
||||
|
||||
uint32_t Box_stts::get_sample_duration(uint32_t sample_idx)
|
||||
{
|
||||
- size_t i = 0;
|
||||
- while (i < m_entries.size()) {
|
||||
- if (sample_idx < m_entries[i].sample_count) {
|
||||
- return m_entries[i].sample_delta;
|
||||
- }
|
||||
- else {
|
||||
- sample_idx -= m_entries[i].sample_count;
|
||||
+ for (const auto& entry : m_entries) {
|
||||
+ if (sample_idx < entry.sample_count) {
|
||||
+ return entry.sample_delta;
|
||||
}
|
||||
+ sample_idx -= entry.sample_count;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -813,14 +810,11 @@ Error Box_ctts::write(StreamWriter& writer) const
|
||||
|
||||
int32_t Box_ctts::get_sample_offset(uint32_t sample_idx)
|
||||
{
|
||||
- size_t i = 0;
|
||||
- while (i < m_entries.size()) {
|
||||
- if (sample_idx < m_entries[i].sample_count) {
|
||||
- return m_entries[i].sample_offset;
|
||||
- }
|
||||
- else {
|
||||
- sample_idx -= m_entries[i].sample_count;
|
||||
+ for (const auto& entry : m_entries) {
|
||||
+ if (sample_idx < entry.sample_count) {
|
||||
+ return entry.sample_offset;
|
||||
}
|
||||
+ sample_idx -= entry.sample_count;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -9,6 +9,7 @@ COMPATIBLE_MACHINE:powerpc64le = "null"
|
||||
SRC_URI = "git://github.com/strukturag/libheif.git;protocol=https;branch=master;tag=v${PV} \
|
||||
file://CVE-2026-3949.patch \
|
||||
file://CVE-2026-32738.patch \
|
||||
file://CVE-2026-32739.patch \
|
||||
"
|
||||
|
||||
SRCREV = "62f1b8c76ed4d8305071fdacbe74ef9717bacac5"
|
||||
|
||||
Reference in new issue
Block a user