From f93c47ab880279490b121cbb4fb17b920c955731 Mon Sep 17 00:00:00 2001 From: François Cami Date: Dec 04 2013 20:56:06 +0000 Subject: Fix FTBS with -Werror=format-security (#1037145) --- diff --git a/jfsutils.spec b/jfsutils.spec index a38b88c..b0129fb 100644 --- a/jfsutils.spec +++ b/jfsutils.spec @@ -1,9 +1,10 @@ Summary: Utilities for managing the JFS filesystem Name: jfsutils Version: 1.1.15 -Release: 2%{?dist} +Release: 3%{?dist} Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Patch0: jfsutils-1.1.15_stdint.patch +Patch1: jfsutils_format-security_ftbs.patch URL: http://jfs.sourceforge.net/ Group: System Environment/Base License: GPLv2+ @@ -26,6 +27,7 @@ into a file; xpeek - shell-type JFS file system editor. %setup -q find . -type f -name *.[ch] -exec chmod -x {} \; %patch0 -p1 +%patch1 -p1 %build %configure @@ -45,6 +47,9 @@ rm -rf $RPM_BUILD_ROOT %doc AUTHORS COPYING NEWS ChangeLog %changelog +* Wed Dec 04 2013 François Cami - 1.1.15-3 +- Fix FTBS with -Werror=format-security (#1037145). + * Thu Sep 05 2013 François Cami - 1.1.15-2 - Install in /usr diff --git a/jfsutils_format-security_ftbs.patch b/jfsutils_format-security_ftbs.patch new file mode 100644 index 0000000..3c9c651 --- /dev/null +++ b/jfsutils_format-security_ftbs.patch @@ -0,0 +1,44 @@ +diff -rU4 jfsutils-1.1.15/fscklog/display.c jfsutils-1.1.15-mine/fscklog/display.c +--- jfsutils-1.1.15/fscklog/display.c 2005-11-22 21:43:54.000000000 +0100 ++++ jfsutils-1.1.15-mine/fscklog/display.c 2013-12-04 21:42:37.451313506 +0100 +@@ -181,9 +181,9 @@ + -1; + } 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 + */ + local_recptr->infile_buf_data_len += +diff -rU4 jfsutils-1.1.15/fscklog/fscklog.c jfsutils-1.1.15-mine/fscklog/fscklog.c +--- jfsutils-1.1.15/fscklog/fscklog.c 2006-06-05 21:31:40.000000000 +0200 ++++ jfsutils-1.1.15-mine/fscklog/fscklog.c 2013-12-04 21:43:57.649593842 +0100 +@@ -251,9 +251,9 @@ + va_end(args); + + 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; + } +diff -rU4 jfsutils-1.1.15/logdump/helpers.c jfsutils-1.1.15-mine/logdump/helpers.c +--- jfsutils-1.1.15/logdump/helpers.c 2005-11-22 21:43:55.000000000 +0100 ++++ jfsutils-1.1.15-mine/logdump/helpers.c 2013-12-04 21:44:33.407704099 +0100 +@@ -94,9 +94,9 @@ + va_end(args); + + 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; + }