1 |
commit: c7ef777892038727cf4e6d2b4635ef68b7a7761c |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 20 17:36:03 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 20 17:50:18 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7ef7778 |
7 |
|
8 |
sys-fs/jfsutils: fix building with -Werror=format-security |
9 |
|
10 |
Closes: https://bugs.gentoo.org/557140 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
.../jfsutils-1.1.15-format-security-errors.patch | 40 ++++++++++++++++++++++ |
14 |
sys-fs/jfsutils/jfsutils-1.1.15-r1.ebuild | 1 + |
15 |
2 files changed, 41 insertions(+) |
16 |
|
17 |
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 |
18 |
new file mode 100644 |
19 |
index 00000000000..f66b9e0d46d |
20 |
--- /dev/null |
21 |
+++ b/sys-fs/jfsutils/files/jfsutils-1.1.15-format-security-errors.patch |
22 |
@@ -0,0 +1,40 @@ |
23 |
+Origin: https://sources.debian.org/patches/jfsutils/1.1.15-5/format-security-errors.patch/ |
24 |
+ |
25 |
+--- a/fscklog/display.c |
26 |
++++ b/fscklog/display.c |
27 |
+@@ -182,7 +182,7 @@ void dump_service_log() |
28 |
+ } else { |
29 |
+ /* the record looks ok */ |
30 |
+ msg_txt = &log_entry[log_entry_pos]; |
31 |
+- printf(msg_txt); |
32 |
++ printf("%s", msg_txt); |
33 |
+ /* |
34 |
+ * set up for the next record |
35 |
+ */ |
36 |
+--- a/fscklog/fscklog.c |
37 |
++++ b/fscklog/fscklog.c |
38 |
+@@ -252,8 +252,8 @@ int v_send_msg(int msg_num, const char *file_name, int line_number, ...) { |
39 |
+ |
40 |
+ sprintf(debug_detail, " [%s:%d]\n", basename(file_name), line_number); |
41 |
+ |
42 |
+- printf(msg_string); |
43 |
+- printf(debug_detail); |
44 |
++ printf("%s", msg_string); |
45 |
++ printf("%s", debug_detail); |
46 |
+ |
47 |
+ return 0; |
48 |
+ } |
49 |
+--- a/logdump/helpers.c |
50 |
++++ b/logdump/helpers.c |
51 |
+@@ -95,8 +95,8 @@ int v_fsck_send_msg(int msg_num, const char *file_name, int line_number, ...) { |
52 |
+ |
53 |
+ sprintf(debug_detail, " [%s:%d]\n", file_name, line_number); |
54 |
+ |
55 |
+- printf(msg_string); |
56 |
+- printf(debug_detail); |
57 |
++ printf("%s", msg_string); |
58 |
++ printf("%s", debug_detail); |
59 |
+ |
60 |
+ return 0; |
61 |
+ } |
62 |
+ |
63 |
|
64 |
diff --git a/sys-fs/jfsutils/jfsutils-1.1.15-r1.ebuild b/sys-fs/jfsutils/jfsutils-1.1.15-r1.ebuild |
65 |
index d828395c2a9..c01b64cd97d 100644 |
66 |
--- a/sys-fs/jfsutils/jfsutils-1.1.15-r1.ebuild |
67 |
+++ b/sys-fs/jfsutils/jfsutils-1.1.15-r1.ebuild |
68 |
@@ -21,6 +21,7 @@ PATCHES=( |
69 |
"${FILESDIR}"/${P}-sysmacros.patch #580056 |
70 |
"${FILESDIR}"/${P}-check-for-ar.patch #726032 |
71 |
"${FILESDIR}"/${P}-gcc10.patch #707314 |
72 |
+ "${FILESDIR}"/${P}-format-security-errors.patch #557140 |
73 |
) |
74 |
|
75 |
src_prepare() { |