public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Simone Caronni <negativo17@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/xevd] rawhide: Fix build on i686
Date: Mon, 10 Aug 2026 14:39:35 GMT [thread overview]
Message-ID: <178637277568.1.7886864206669071934.rpms-xevd-ba8fb3fa8297@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/xevd
Branch : rawhide
Commit : ba8fb3fa8297f91ae13970d08c4df0733ecefc1a
Author : Simone Caronni <negativo17@gmail.com>
Date : 2026-08-10T16:39:22+02:00
Stats : +46/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/xevd/c/ba8fb3fa8297f91ae13970d08c4df0733ecefc1a?branch=rawhide
Log:
Fix build on i686
---
diff --git a/xevd-0.7.0-format-overflow.patch b/xevd-0.7.0-format-overflow.patch
new file mode 100644
index 0000000..2d33e38
--- /dev/null
+++ b/xevd-0.7.0-format-overflow.patch
@@ -0,0 +1,45 @@
+From: Simone Caronni <negativo17@gmail.com>
+Subject: [PATCH] Avoid buffer overflows in the trace line helpers
+
+xevd_trace_line() and log_line() copy a caller supplied string of unknown
+length into a fixed 128 byte buffer with sprintf(), which GCC diagnoses as a
+potential format overflow. Upstream builds with -Werror, so this breaks the
+build on i686.
+
+Use snprintf() with an explicit precision, so the copy is bounded both by the
+size of the destination buffer and by the line width the helpers pad to, and
+only write the terminating NUL when it still falls inside the buffer.
+
+--- a/src_base/xevd_port.c
++++ b/src_base/xevd_port.c
+@@ -49,10 +49,10 @@
+ int len = (pre == NULL) ? 0 : (int)strlen(pre);
+ if (len > 0)
+ {
+- sprintf(str, "%s ", pre);
++ snprintf(str, sizeof(str), "%.*s ", chars - 1, pre);
+ len = (int)strlen(str);
+ }
+ for (int i = len; i < chars; i++) { str[i] = '='; }
+- str[chars] = '\0';
++ if (len < chars) { str[chars] = '\0'; }
+ printf("%s\n", str);
+ }
+\ No newline at end of file
+--- a/app/xevd_app_util.h
++++ b/app/xevd_app_util.h
+@@ -67,12 +67,12 @@
+ len = (pre == NULL)? 0: (int)strlen(pre);
+ if(len > 0)
+ {
+- sprintf(str + 3, " %s ", pre);
++ snprintf(str + 3, sizeof(str) - 3, " %.*s ", chars - 5, pre);
+ len = (int)strlen(str);
+ }
+
+ for(i = len ; i< chars; i++) {str[i] = '=';}
+- str[chars] = '\0';
++ if(len < chars) {str[chars] = '\0';}
+ printf("%s\n", str);
+ }
+
diff --git a/xevd.spec b/xevd.spec
index 4012f61..40a08d8 100644
--- a/xevd.spec
+++ b/xevd.spec
@@ -9,6 +9,7 @@ URL: https://github.com/mpeg5/xevd
Source0: %{name}-free-%{version}.tar.gz
# Script to generate tarball with unencumbered sources
Source1: %{name}_gen_free_tarball.sh
+Patch0: %{name}-%{version}-format-overflow.patch
BuildRequires: cmake >= 3.12
BuildRequires: gcc
reply other threads:[~2026-08-10 14:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178637277568.1.7886864206669071934.rpms-xevd-ba8fb3fa8297@fedoraproject.org \
--to=negativo17@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox