summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-08-20 19:36:03 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-08-20 19:50:18 +0200
commitc7ef777892038727cf4e6d2b4635ef68b7a7761c (patch)
treea3f4b5777d5441c605a6b9728cf16c1ad96b3eb2 /sys-fs/jfsutils
parentsys-fs/jfsutils: fix building against gcc-10 (diff)
downloadgentoo-c7ef777892038727cf4e6d2b4635ef68b7a7761c.tar.gz
gentoo-c7ef777892038727cf4e6d2b4635ef68b7a7761c.tar.bz2
gentoo-c7ef777892038727cf4e6d2b4635ef68b7a7761c.zip
sys-fs/jfsutils: fix building with -Werror=format-security
Closes: https://bugs.gentoo.org/557140 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'sys-fs/jfsutils')
-rw-r--r--sys-fs/jfsutils/files/jfsutils-1.1.15-format-security-errors.patch40
-rw-r--r--sys-fs/jfsutils/jfsutils-1.1.15-r1.ebuild1
2 files changed, 41 insertions, 0 deletions
diff --git a/sys-fs/jfsutils/files/jfsutils-1.1.15-format-security-errors.patch b/sys-fs/jfsutils/files/jfsutils-1.1.15-format-security-errors.patch
new file mode 100644
index 000000000000..f66b9e0d46df
--- /dev/null
+++ b/sys-fs/jfsutils/files/jfsutils-1.1.15-format-security-errors.patch
@@ -0,0 +1,40 @@
+Origin: https://sources.debian.org/patches/jfsutils/1.1.15-5/format-security-errors.patch/
+
+--- a/fscklog/display.c
++++ b/fscklog/display.c
+@@ -182,7 +182,7 @@ void dump_service_log()
+ } else {
+ /* the record looks ok */
+ msg_txt = &log_entry[log_entry_pos];
+- printf(msg_txt);
++ printf("%s", msg_txt);
+ /*
+ * set up for the next record
+ */
+--- a/fscklog/fscklog.c
++++ b/fscklog/fscklog.c
+@@ -252,8 +252,8 @@ int v_send_msg(int msg_num, const char *file_name, int line_number, ...) {
+
+ sprintf(debug_detail, " [%s:%d]\n", basename(file_name), line_number);
+
+- printf(msg_string);
+- printf(debug_detail);
++ printf("%s", msg_string);
++ printf("%s", debug_detail);
+
+ return 0;
+ }
+--- a/logdump/helpers.c
++++ b/logdump/helpers.c
+@@ -95,8 +95,8 @@ int v_fsck_send_msg(int msg_num, const char *file_name, int line_number, ...) {
+
+ sprintf(debug_detail, " [%s:%d]\n", file_name, line_number);
+
+- printf(msg_string);
+- printf(debug_detail);
++ printf("%s", msg_string);
++ printf("%s", debug_detail);
+
+ return 0;
+ }
+
diff --git a/sys-fs/jfsutils/jfsutils-1.1.15-r1.ebuild b/sys-fs/jfsutils/jfsutils-1.1.15-r1.ebuild
index d828395c2a9c..c01b64cd97d2 100644
--- a/sys-fs/jfsutils/jfsutils-1.1.15-r1.ebuild
+++ b/sys-fs/jfsutils/jfsutils-1.1.15-r1.ebuild
@@ -21,6 +21,7 @@ PATCHES=(
"${FILESDIR}"/${P}-sysmacros.patch #580056
"${FILESDIR}"/${P}-check-for-ar.patch #726032
"${FILESDIR}"/${P}-gcc10.patch #707314
+ "${FILESDIR}"/${P}-format-security-errors.patch #557140
)
src_prepare() {