diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-12-03 09:52:47 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-12-03 14:39:36 +0000 |
commit | adc79e42efe943ea505ff76d79f3fbbd03d615c6 (patch) | |
tree | 4500cac1ddff3c5b8c7b78bfef96748126f0f2da /main/unarj/format.patch | |
parent | 19b451b6458e6af8b966b2b45f6c838da8df9477 (diff) | |
download | aports-adc79e42efe943ea505ff76d79f3fbbd03d615c6.tar.bz2 aports-adc79e42efe943ea505ff76d79f3fbbd03d615c6.tar.xz |
main/unarj: build with -Wformat -Werror=format-security
Diffstat (limited to 'main/unarj/format.patch')
-rw-r--r-- | main/unarj/format.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/main/unarj/format.patch b/main/unarj/format.patch new file mode 100644 index 0000000000..2c4c0ab7df --- /dev/null +++ b/main/unarj/format.patch @@ -0,0 +1,66 @@ +diff --git a/unarj.c b/unarj.c +index 02b1a63..85e7b05 100644 +--- a/unarj.c ++++ b/unarj.c +@@ -696,7 +696,7 @@ check_flags() + } + if ((arj_flags & GARBLE_FLAG) != 0) + { +- printf(M_ENCRYPT); ++ printf("%s", M_ENCRYPT); + printf(M_SKIPPED, filename); + skip(); + return -1; +@@ -777,7 +777,7 @@ extract() + } + printf(M_EXTRACT, name); + if (host_os != OS && file_type == BINARY_TYPE) +- printf(M_DIFFHOST); ++ printf("%s", M_DIFFHOST); + printf(" "); + + crc = CRC_MASK; +@@ -793,10 +793,10 @@ extract() + set_ftime_mode(name, time_stamp, file_mode, (uint) host_os); + + if ((crc ^ CRC_MASK) == file_crc) +- printf(M_CRCOK); ++ printf("%s", M_CRCOK); + else + { +- printf(M_CRCERROR); ++ printf("%s", M_CRCERROR); + error_count++; + } + return 1; +@@ -822,10 +822,10 @@ test() + decode_f(); + + if ((crc ^ CRC_MASK) == file_crc) +- printf(M_CRCOK); ++ printf("%s", M_CRCOK); + else + { +- printf(M_CRCERROR); ++ printf("%s", M_CRCERROR); + error_count++; + } + return 1; +@@ -972,7 +972,7 @@ help() + int i; + + for (i = 0; M_USAGE[i] != NULL; i++) +- printf(M_USAGE[i]); ++ printf("%s", M_USAGE[i]); + } + + int +@@ -987,7 +987,7 @@ char *argv[]; + argc = ccommand(&argv); + #endif + +- printf(M_VERSION); ++ printf("%s", M_VERSION); + + if (argc == 1) + { |