aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2024-03-28 21:16:31 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2024-04-01 18:08:45 +0000
commit6f596b6acc3febddb67e87abda24c1163d138e3e (patch)
tree95b0cccfce8f19a5f8e7334ff4ac01a10d7fc52a
parent54c8c8a01fd02d4285cf47270979e3b45180037a (diff)
community/gst-plugins-good: backport fix for test
re-enable x86
-rw-r--r--community/gst-plugins-good/APKBUILD6
-rw-r--r--community/gst-plugins-good/tests-fix-memory-corruption.patch38
2 files changed, 42 insertions, 2 deletions
diff --git a/community/gst-plugins-good/APKBUILD b/community/gst-plugins-good/APKBUILD
index 0b7940da864..d5f99cda1fd 100644
--- a/community/gst-plugins-good/APKBUILD
+++ b/community/gst-plugins-good/APKBUILD
@@ -55,10 +55,11 @@ makedepends="
ldpath="/usr/lib/gstreamer-1.0"
source="https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-$pkgver.tar.xz
flaky-test.patch
+ tests-fix-memory-corruption.patch
"
case "$CARCH" in
-armhf|s390x|ppc64le|x86)
+armhf|s390x|ppc64le)
# really flaky tests
options="$options !check"
;;
@@ -76,7 +77,7 @@ esac
# - CVE-2022-1923
# - CVE-2022-1924
# - CVE-2022-1925
-# - CVE-2022-2122
+# - CVE-2022-2122
# 1.18.4-r0:
# - CVE-2021-3497
# - CVE-2021-3498
@@ -143,4 +144,5 @@ gtk() {
sha512sums="
e6105c90a66bfee8a69f621bf44f53fcbf832ec9290cee984354da91e57b61d2bbd548e3ad0c5d9f859d0c3f5ba3c313539f24b350e0a7acf29cb8983d4f40cb gst-plugins-good-1.22.11.tar.xz
e471a892c511c501fdd336cd1729df4e955e266a395260db50665b4ee717d881a007ae84873c57e386931c042ce08ee8f3ab8e102ba251632f724e167b5af913 flaky-test.patch
+7779f0eee4dda158c88e19e4d0534afd5cdde393d269f88a521cda0f2106afc2a0b386cc7b13242fed8ce7f71e4d9400507e5bef19bc0374eadc81a0a5e3a14b tests-fix-memory-corruption.patch
"
diff --git a/community/gst-plugins-good/tests-fix-memory-corruption.patch b/community/gst-plugins-good/tests-fix-memory-corruption.patch
new file mode 100644
index 00000000000..313feaba2ab
--- /dev/null
+++ b/community/gst-plugins-good/tests-fix-memory-corruption.patch
@@ -0,0 +1,38 @@
+From f6f3c1527fa799042fb0906ac221c2d01ce88d2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
+Date: Thu, 28 Mar 2024 19:49:46 +0000
+Subject: [PATCH] tests: rtpred: fix out-of-bound writes
+
+Don't write more data to the buffer than we allocated
+space for.
+
+Fixes #3312
+---
+ subprojects/gst-plugins-good/tests/check/elements/rtpred.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/subprojects/gst-plugins-good/tests/check/elements/rtpred.c b/subprojects/gst-plugins-good/tests/check/elements/rtpred.c
+index 99b08fdd7a0..80dd2715f56 100644
+--- a/tests/check/elements/rtpred.c
++++ b/tests/check/elements/rtpred.c
+@@ -398,7 +398,7 @@ GST_START_TEST (rtpreddec_invalid)
+ bufinp =
+ _new_rtp_buffer (FALSE, 0, PT_RED, 1, TIMESTAMP_NTH (1), 0xabe2b0b, 1);
+ fail_unless (gst_rtp_buffer_map (bufinp, GST_MAP_WRITE, &rtp));
+- memcpy (gst_rtp_buffer_get_payload (&rtp), &data, sizeof (data));
++ memcpy (gst_rtp_buffer_get_payload (&rtp), &data, 1);
+ gst_rtp_buffer_unmap (&rtp);
+ _push_and_check_didnt_go_through (h, bufinp);
+
+@@ -406,7 +406,7 @@ GST_START_TEST (rtpreddec_invalid)
+ bufinp =
+ _new_rtp_buffer (FALSE, 0, PT_RED, 2, TIMESTAMP_NTH (2), 0xabe2b0b, 4);
+ fail_unless (gst_rtp_buffer_map (bufinp, GST_MAP_WRITE, &rtp));
+- memcpy (gst_rtp_buffer_get_payload (&rtp), &data, sizeof (data));
++ memcpy (gst_rtp_buffer_get_payload (&rtp), &data, 4);
+ gst_rtp_buffer_unmap (&rtp);
+ _push_and_check_didnt_go_through (h, bufinp);
+
+--
+GitLab
+