summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/ardour/ardour-8.10-r3.ebuild (renamed from media-sound/ardour/ardour-8.10-r2.ebuild)2
-rw-r--r--media-sound/ardour/files/ardour-9.0.0-fix-unlikely-buffer-overflow.patch19
-rw-r--r--media-sound/ardour/files/ardour-9.0.0-properly-check-for-syscall.patch16
3 files changed, 37 insertions, 0 deletions
diff --git a/media-sound/ardour/ardour-8.10-r2.ebuild b/media-sound/ardour/ardour-8.10-r3.ebuild
index bb6ece851b94..cba0bc79c8e1 100644
--- a/media-sound/ardour/ardour-8.10-r2.ebuild
+++ b/media-sound/ardour/ardour-8.10-r3.ebuild
@@ -72,6 +72,8 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}/${PN}-6.8-metadata.patch"
"${FILESDIR}/${PN}-9.0.0-fix-clang-crash.patch"
+ "${FILESDIR}/${PN}-9.0.0-properly-check-for-syscall.patch"
+ "${FILESDIR}/${PN}-9.0.0-fix-unlikely-buffer-overflow.patch"
)
pkg_pretend() {
diff --git a/media-sound/ardour/files/ardour-9.0.0-fix-unlikely-buffer-overflow.patch b/media-sound/ardour/files/ardour-9.0.0-fix-unlikely-buffer-overflow.patch
new file mode 100644
index 000000000000..fd698f67bdd3
--- /dev/null
+++ b/media-sound/ardour/files/ardour-9.0.0-fix-unlikely-buffer-overflow.patch
@@ -0,0 +1,19 @@
+From 02fde5f1aa3997d880f185c2083707e8715cfa59 Mon Sep 17 00:00:00 2001
+From: Robin Gareus <robin@gareus.org>
+Date: Wed, 6 Nov 2024 04:07:01 +0100
+Subject: [PATCH] Fix unlikely buffer overflow #9845
+
+> warning: 'sscanf' may overflow; destination buffer in argument 6
+> has size 32, but the corresponding specifier may require size 33
+> [-Wfortify-source]
+--- a/gtk2_ardour/transcode_ffmpeg.cc
++++ b/gtk2_ardour/transcode_ffmpeg.cc
+@@ -192,7 +192,7 @@ TranscodeFfmpeg::probe ()
+ PARSE_FRACTIONAL_FPS (timebase)
+ } else if (key == X_("timecode") && m_duration == 0 && m_fps > 0) {
+ int h, m, s;
+- char f[32];
++ char f[33];
+ if (sscanf (i->at (16).c_str (), "%d:%d:%d:%32s", &h, &m, &s, f) == 4) {
+ m_duration = (ARDOUR::samplecnt_t)floor (m_fps * (h * 3600.0 + m * 60.0 + s * 1.0 + atoi (f) / pow ((double)10, (int)strlen (f))));
+ }
diff --git a/media-sound/ardour/files/ardour-9.0.0-properly-check-for-syscall.patch b/media-sound/ardour/files/ardour-9.0.0-properly-check-for-syscall.patch
new file mode 100644
index 000000000000..12f677c3828c
--- /dev/null
+++ b/media-sound/ardour/files/ardour-9.0.0-properly-check-for-syscall.patch
@@ -0,0 +1,16 @@
+From ba4d9709c6e442ee57329fd592d48fc98ea0b937 Mon Sep 17 00:00:00 2001
+From: Robin Gareus <robin@gareus.org>
+Date: Wed, 6 Nov 2024 04:07:25 +0100
+Subject: [PATCH] Properly check for syscall (#9845)
+
+--- a/libs/ardour/wscript
++++ b/libs/ardour/wscript
+@@ -355,7 +355,7 @@ def configure(conf):
+ features = 'c',
+ mandatory = False,
+ execute = False,
+- fragment = "#include <sys/syscall.h>\nint main () { syscall(SYS_ioprio_set, 1, 0, 8192); return 0; }")
++ fragment = "#include <unistd.h>\n#include <sys/syscall.h>\nint main () { syscall(SYS_ioprio_set, 1, 0, 8192); return 0; }")
+
+ if have_sys_ioprio:
+ conf.define('HAVE_IOPRIO', 1)