commit: c7ef777892038727cf4e6d2b4635ef68b7a7761c Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> AuthorDate: Thu Aug 20 17:36:03 2020 +0000 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> CommitDate: Thu Aug 20 17:50:18 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7ef7778
sys-fs/jfsutils: fix building with -Werror=format-security Closes: https://bugs.gentoo.org/557140 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> .../jfsutils-1.1.15-format-security-errors.patch | 40 ++++++++++++++++++++++ sys-fs/jfsutils/jfsutils-1.1.15-r1.ebuild | 1 + 2 files changed, 41 insertions(+) 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 00000000000..f66b9e0d46d --- /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 d828395c2a9..c01b64cd97d 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() {
