From s.l-h at gmx.de Fri Dec 12 23:00:08 2014 From: s.l-h at gmx.de (Stefan Lippers-Hollmann) Date: Sat, 13 Dec 2014 00:00:08 +0100 Subject: [Pkg-lirc-maint] [PATCH 05/13] lirc-lsremotes: fix FTBS with -Werror=format-security enabled In-Reply-To: References: Message-ID: <87b1f771fddf5265dd4ebc3bb476fe75eb9f217e.1418422770.git.s.l-h@gmx.de> gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I.. -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o lirc-lsremotes.o lirc-lsremotes.c lirc-lsremotes.c: In function 'main': lirc-lsremotes.c:261:4: error: format not a string literal and no format arguments [-Werror=format-security] printf(USAGE); ^ lirc-lsremotes.c:280:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, USAGE); ^ Signed-off-by: Stefan Lippers-Hollmann --- tools/lirc-lsremotes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lirc-lsremotes.c b/tools/lirc-lsremotes.c index 2ac7dad..6cddb19 100644 --- a/tools/lirc-lsremotes.c +++ b/tools/lirc-lsremotes.c @@ -258,7 +258,7 @@ int main(int argc, char** argv) opt_silent = 1; break; case 'h': - printf(USAGE); + printf("%s", USAGE); return (EXIT_SUCCESS); case 'v': printf("%s\n", "lirc-lsremotes " VERSION); @@ -277,7 +277,7 @@ int main(int argc, char** argv) dirpath = argv[optind]; configs = "*"; } else { - fprintf(stderr, USAGE); + fprintf(stderr, "%s", USAGE); return EXIT_FAILURE; } lirc_log_get_clientlog("lirc-lsremotes", path, sizeof(path)); -- 2.1.3 From s.l-h at gmx.de Fri Dec 12 23:00:05 2014 From: s.l-h at gmx.de (Stefan Lippers-Hollmann) Date: Sat, 13 Dec 2014 00:00:05 +0100 Subject: [Pkg-lirc-maint] [PATCH 02/13] lircmd: fix FTBS with -Werror=format-security enabled In-Reply-To: References: Message-ID: <58ee96b7aa0aa4b50308d683baa260cfd1880070.1418422770.git.s.l-h@gmx.de> gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -Wall -Wp,-D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o lircmd.o lircmd.c lircmd.c: In function 'lircmd_parse_options': lircmd.c:787:4: error: format not a string literal and no format arguments [-Werror=format-security] printf(help); ^ Signed-off-by: Stefan Lippers-Hollmann --- daemons/lircmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemons/lircmd.c b/daemons/lircmd.c index 023777c..3442f48 100644 --- a/daemons/lircmd.c +++ b/daemons/lircmd.c @@ -784,7 +784,7 @@ static void lircmd_parse_options(int argc, char** const argv) { switch (c) { case 'h': - printf(help); + printf("%s", help); exit(EXIT_SUCCESS); case 'v': printf("lircmd %s\n", VERSION); -- 2.1.3 From s.l-h at gmx.de Fri Dec 12 23:00:14 2014 From: s.l-h at gmx.de (Stefan Lippers-Hollmann) Date: Sat, 13 Dec 2014 00:00:14 +0100 Subject: [Pkg-lirc-maint] [PATCH 11/13] lirc-lsplugins: fix FTBS with -Werror=format-security enabled In-Reply-To: References: Message-ID: <9c27c108acc4f122f55d49cec7ffdc880878dfd3.1418422770.git.s.l-h@gmx.de> gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I.. -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o lirc-lsplugins.o lirc-lsplugins.c lirc-lsplugins.c: In function 'line_print': lirc-lsplugins.c:155:3: error: format not a string literal and no format arguments [-Werror=format-security] printf(line->errors); ^ lirc-lsplugins.c: In function 'print_folded_item': lirc-lsplugins.c:181:3: error: format not a string literal and no format arguments [-Werror=format-security] printf(token); ^ Signed-off-by: Stefan Lippers-Hollmann --- tools/lirc-lsplugins.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lirc-lsplugins.c b/tools/lirc-lsplugins.c index 10403a7..77c14a2 100644 --- a/tools/lirc-lsplugins.c +++ b/tools/lirc-lsplugins.c @@ -152,7 +152,7 @@ static void line_print(const line_t* line) printf("%-20s%-6s%s\n", line->name, line->flags, line->path); if (line->errors) - printf(line->errors); + printf("%s", line->errors); } static void print_folded_item(const char* arg) @@ -178,7 +178,7 @@ static void print_folded_item(const char* arg) printf(" "); pos += 1; } - printf(token); + printf("%s", token); pos += strlen(token); token = strtok(NULL, " \t"); } -- 2.1.3 From s.l-h at gmx.de Fri Dec 12 23:00:10 2014 From: s.l-h at gmx.de (Stefan Lippers-Hollmann) Date: Sat, 13 Dec 2014 00:00:10 +0100 Subject: [Pkg-lirc-maint] [PATCH 07/13] irsimsend: fix FTBS with -Werror=format-security enabled In-Reply-To: References: Message-ID: gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I.. -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o irsimsend.o irsimsend.c irsimsend.c: In function 'parse_uint_arg': irsimsend.c:199:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, errmsg); ^ irsimsend.c: In function 'main': irsimsend.c:216:4: error: format not a string literal and no format arguments [-Werror=format-security] printf(USAGE); ^ irsimsend.c:246:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, USAGE); ^ Signed-off-by: Stefan Lippers-Hollmann --- tools/irsimsend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/irsimsend.c b/tools/irsimsend.c index b72831a..e8dcd07 100644 --- a/tools/irsimsend.c +++ b/tools/irsimsend.c @@ -196,7 +196,7 @@ int parse_uint_arg(const char* optind, const char* errmsg) c = strtol(optarg, NULL, 10); if (c > INT_MAX || c < 0 || errno == EINVAL || errno == ERANGE) { - fprintf(stderr, errmsg); + fprintf(stderr, "%s", errmsg); exit(EXIT_FAILURE); } return (int) c; @@ -213,7 +213,7 @@ int main(int argc, char *argv[]) != EOF) { switch (c) { case 'h': - printf(USAGE); + printf("%s", USAGE); return (EXIT_SUCCESS); case 'c': opt_count = parse_uint_arg(optarg, @@ -243,7 +243,7 @@ int main(int argc, char *argv[]) } } if (argc != optind + 1) { - fprintf(stderr, USAGE); + fprintf(stderr, "%s", USAGE); return EXIT_FAILURE; } lirc_log_get_clientlog("irsimsend", path, sizeof(path)); -- 2.1.3 From s.l-h at gmx.de Fri Dec 12 23:00:15 2014 From: s.l-h at gmx.de (Stefan Lippers-Hollmann) Date: Sat, 13 Dec 2014 00:00:15 +0100 Subject: [Pkg-lirc-maint] [PATCH 12/13] fix building manpages in parallel In-Reply-To: References: Message-ID: Avoid race conditions when building manpages in parallel. Signed-off-by: Stefan Lippers-Hollmann --- This was a very apparent problem in lirc 0.9.1, while I haven't seen this triggering in 0.9.2+ yet, but this change is safe either way and follows the coding style used elsewhere (a simple mkdir -p without the test condition would work the same way). doc/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 8a05a7d..854192e 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -77,7 +77,7 @@ $(generated_html): $(html_sources) $(SED) -i "s/@version@/$(VERSION)/" $@ $(manpage_html): $(nodist_man_MANS) - -test -d man-html || mkdir man-html + -test -d man-html || mkdir -p man-html cat $(srcdir)/html-source/head.html > $@ src=$$(echo $(srcdir)/$@ | \ $(SED) -e 's/man-html/man-source/' -e 's/\.html//'); \ @@ -90,7 +90,7 @@ $(manpage_html): $(nodist_man_MANS) cat $(srcdir)/html-source/foot.html >> $@ $(nodist_man_MANS): $(man_sources) - -test -d man || mkdir man + -test -d man || mkdir -p man src=$$(echo $(srcdir)/$@ | $(SED) 's|/man/|/man-source/|'); \ cp $$src $@ $(SED) -i "s/@version@/$(VERSION)/" $@ -- 2.1.3 From s.l-h at gmx.de Fri Dec 12 23:00:12 2014 From: s.l-h at gmx.de (Stefan Lippers-Hollmann) Date: Sat, 13 Dec 2014 00:00:12 +0100 Subject: [Pkg-lirc-maint] [PATCH 09/13] irrecord: fix FTBS with -Werror=format-security enabled In-Reply-To: References: Message-ID: gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I.. -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o irrecord.o irrecord.c irrecord.c: In function 'parse_options': irrecord.c:342:4: error: format not a string literal and no format arguments [-Werror=format-security] printf(help); ^ Signed-off-by: Stefan Lippers-Hollmann --- tools/irrecord.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/irrecord.c b/tools/irrecord.c index f52328c..96ebe55 100644 --- a/tools/irrecord.c +++ b/tools/irrecord.c @@ -339,7 +339,7 @@ static void parse_options(int argc, char** const argv) options_set_opt("irrecord:driver", optarg); break; case 'h': - printf(help); + printf("%s", help); exit(EXIT_SUCCESS); case 'i': options_set_opt("irrecord:invert", "True"); -- 2.1.3 From s.l-h at gmx.de Fri Dec 12 23:00:13 2014 From: s.l-h at gmx.de (Stefan Lippers-Hollmann) Date: Sat, 13 Dec 2014 00:00:13 +0100 Subject: [Pkg-lirc-maint] [PATCH 10/13] xmode2: fix FTBS with -Werror=format-security enabled In-Reply-To: References: Message-ID: <195d24327fac111aed910a0fba4b59bfe05b65c7.1418422770.git.s.l-h@gmx.de> gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I.. -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o xmode2.o xmode2.c xmode2.c: In function 'parse_options': xmode2.c:142:3: error: format not a string literal and no format arguments [-Werror=format-security] case 'h':printf(help); ^ Signed-off-by: Stefan Lippers-Hollmann --- tools/xmode2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xmode2.c b/tools/xmode2.c index 6a45d4c..24b2470 100644 --- a/tools/xmode2.c +++ b/tools/xmode2.c @@ -139,7 +139,7 @@ static void parse_options(int argc, char** const argv) add_defaults(); while ((c = getopt_long(argc, argv, "U:hvd:H:g:t:mr", options, NULL)) != -1) { switch (c) { - case 'h':printf(help); + case 'h':printf("%s", help); exit (EXIT_SUCCESS); case 'H': if (hw_choose_driver(optarg) != 0) { -- 2.1.3 From s.l-h at gmx.de Fri Dec 12 23:00:03 2014 From: s.l-h at gmx.de (Stefan Lippers-Hollmann) Date: Sat, 13 Dec 2014 00:00:03 +0100 Subject: [Pkg-lirc-maint] [PATCH 00/13] build fixes and initial syncing of Debian specific patches Message-ID: Hi This patch series is a first batch to submit Debian's patch set for lirc[1] upstream. It will be followed up with further patches (fixing compatibility with FreeBSD and Debian/ kFreeBSD) later, once I've adapted the packaging and resynced the patches to the 0.9.2 code base. Patches 0001-0011 are relatively simple build fixes for using hardening (-Werror=format-security). Patch 0012 fixes a potential race condition when building docs in parallel. It was very likely to trigger with 0.9.1 but hasn't triggered for me with 0.9.2 yet, but is a safe change either way. Patch 0013 removes an ancient example initscript for Debian which can't possibly work with any of the still supported Debian versions. The patches are based on the current HEAD of the master branch (lirc-0.8.7-583-g3a0c3a0). Regards Stefan Lippers-Hollmann [1] unsanitized/ unreleased patches for lirc 0.9.1 are available at http://anonscm.debian.org/viewvc/pkg-lirc/lirc/trunk/debian/patches/ updating to 0.9.2+ is still in progress. Stefan Lippers-Hollmann (13): lircd: fix FTBS with -Werror=format-security enabled lircmd: fix FTBS with -Werror=format-security enabled mode2: fix FTBS with -Werror=format-security enabled irsend: fix FTBS with -Werror=format-security enabled lirc-lsremotes: fix FTBS with -Werror=format-security enabled irtestcase: fix FTBS with -Werror=format-security enabled irsimsend: fix FTBS with -Werror=format-security enabled irsimreceive: fix FTBS with -Werror=format-security enabled irrecord: fix FTBS with -Werror=format-security enabled xmode2: fix FTBS with -Werror=format-security enabled lirc-lsplugins: fix FTBS with -Werror=format-security enabled fix building manpages in parallel drop contrib/lirc.debian initscript example contrib/lirc.debian | 48 ------------------------------------------------ daemons/lircd.c | 4 ++-- daemons/lircmd.c | 2 +- doc/Makefile.am | 4 ++-- tools/irrecord.c | 2 +- tools/irsend.c | 2 +- tools/irsimreceive.c | 4 ++-- tools/irsimsend.c | 6 +++--- tools/irtestcase.c | 6 +++--- tools/lirc-lsplugins.c | 4 ++-- tools/lirc-lsremotes.c | 4 ++-- tools/mode2.c | 2 +- tools/xmode2.c | 2 +- 13 files changed, 21 insertions(+), 69 deletions(-) delete mode 100755 contrib/lirc.debian -- 2.1.3 From s.l-h at gmx.de Fri Dec 12 23:00:04 2014 From: s.l-h at gmx.de (Stefan Lippers-Hollmann) Date: Sat, 13 Dec 2014 00:00:04 +0100 Subject: [Pkg-lirc-maint] [PATCH 01/13] lircd: fix FTBS with -Werror=format-security enabled In-Reply-To: References: Message-ID: <9912fa10cd37c7d292e5f4a173f80321db5de91f.1418422770.git.s.l-h@gmx.de> gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -Wall -Wp,-D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -DSIM_SEND -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o lircd_simsend-lircd.o `test -f 'lircd.c' || echo './'`lircd.c lircd.c: In function 'lircd_parse_options': lircd.c:2269:4: error: format not a string literal and no format arguments [-Werror=format-security] printf(help); ^ lircd.c: In function 'main': lircd.c:2417:5: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, errmsg); ^ Signed-off-by: Stefan Lippers-Hollmann --- daemons/lircd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemons/lircd.c b/daemons/lircd.c index 3a7f744..45ac1e6 100644 --- a/daemons/lircd.c +++ b/daemons/lircd.c @@ -2266,7 +2266,7 @@ static void lircd_parse_options(int argc, char** const argv) { switch (c) { case 'h': - printf(help); + printf("%s", help); exit(EXIT_SUCCESS); case 'v': printf("lircd %s\n", VERSION); @@ -2414,7 +2414,7 @@ int main(int argc, char **argv) opt = options_getstring("lircd:listen_hostport"); if (opt){ if (opt2host_port(opt, &address, &port, errmsg) != 0){ - fprintf(stderr, errmsg); + fprintf(stderr, "%s", errmsg); return(EXIT_FAILURE); } } else -- 2.1.3 From s.l-h at gmx.de Fri Dec 12 23:00:16 2014 From: s.l-h at gmx.de (Stefan Lippers-Hollmann) Date: Sat, 13 Dec 2014 00:00:16 +0100 Subject: [Pkg-lirc-maint] [PATCH 13/13] drop contrib/lirc.debian initscript example In-Reply-To: References: Message-ID: Debian defaults to using insserv since 2009 (Debian 6.0 "squeeze"), which requires all initscripts to sport LSB headers to allow dependency based boot sequencing, thereby breaking this initscript (insserv was already optional/ recommended in Debian 2008, Debian 5.0 "lenny"). To the best of my knowledge the situation is similar for Ubuntu, as far as I know they made LSB headers mandatory before Debian. Starting with Debian 9 "jessie" (to be released in 2015), systemd is the default init system, allowing the upstream systemd units to be used without changes. Private lirc builds targetted at older Debian systems are recommended to build upon the existing initscript(s) provided by the packaged lirc version of the respective Debian suites. Given that lirc 0.9.x depends on kernel >= 2.6.36 (which restricts the usability of this code base to newer than Debian 7 "wheezy", or the -by now EOLed- Debian 6.0 "squeeze" with manually updated kernels), it doesn't make sense to retain this ancient initscript. Signed-off-by: Stefan Lippers-Hollmann --- The situation should be very similar for SuSE/ OpenSUSE, which means contrib/lirc.suse, contrib/lirc.suse6.2 and contrib/lirc.suse7.1 should probably be removed as well. Likewise contrib/lirc.redhat is probably obsolete as well. contrib/lirc.debian | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100755 contrib/lirc.debian diff --git a/contrib/lirc.debian b/contrib/lirc.debian deleted file mode 100755 index e34f32e..0000000 --- a/contrib/lirc.debian +++ /dev/null @@ -1,48 +0,0 @@ -#! /bin/sh -# -# This is an init script for Debian 2.1 Slink distribution. -# Copy it to /etc/init.d/lirc and type -# > update-rc.d lirc defaults 20 -# - - -test -f /usr/local/sbin/lircd || exit 0 -test -f /usr/local/sbin/lircmd || exit 0 - -case "$1" in - start) - echo -n "Starting lirc daemon: lircd" - start-stop-daemon --start --quiet --exec /usr/local/sbin/lircd -- --device=/dev/lirc - echo -n " lircmd" - start-stop-daemon --start --quiet --exec /usr/local/sbin/lircmd - echo "." - ;; - stop) - echo -n "Stopping lirc daemon: lircmd" - start-stop-daemon --stop --quiet --exec /usr/local/sbin/lircmd - echo -n " lircd" - start-stop-daemon --stop --quiet --exec /usr/local/sbin/lircd - echo "." - ;; - reload|force-reload) - start-stop-daemon --stop --quiet --signal 1 --exec /usr/local/sbin/lircd - start-stop-daemon --stop --quiet --signal 1 --exec /usr/local/sbin/lircmd - ;; - restart) - echo -n "Stopping lirc daemon: lircmd" - start-stop-daemon --stop --quiet --exec /usr/local/sbin/lircmd - echo " lircd" - start-stop-daemon --stop --quiet --exec /usr/local/sbin/lircd - sleep 1 - echo -n "Starting lirc daemon: lircd" - start-stop-daemon --start --quiet --exec /usr/local/sbin/lircd -- --device=/dev/lirc - echo -n " lircmd" - start-stop-daemon --start --quiet --exec /usr/local/sbin/lircmd - echo "." - ;; - *) - echo "Usage: /etc/init.d/lircd {start|stop|reload|restart|force-reload}" - exit 1 -esac - -exit 0 -- 2.1.3 From s.l-h at gmx.de Fri Dec 12 23:00:06 2014 From: s.l-h at gmx.de (Stefan Lippers-Hollmann) Date: Sat, 13 Dec 2014 00:00:06 +0100 Subject: [Pkg-lirc-maint] [PATCH 03/13] mode2: fix FTBS with -Werror=format-security enabled In-Reply-To: References: Message-ID: gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I.. -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o mode2.o mode2.c mode2.c: In function 'parse_options': mode2.c:98:4: error: format not a string literal and no format arguments [-Werror=format-security] printf(help); ^ Signed-off-by: Stefan Lippers-Hollmann --- tools/mode2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mode2.c b/tools/mode2.c index c055a5e..769ff5c 100644 --- a/tools/mode2.c +++ b/tools/mode2.c @@ -95,7 +95,7 @@ static void parse_options(int argc, char** argv) { switch (c) { case 'h': - printf(help); + printf("%s", help); exit(EXIT_SUCCESS); case 'H': if (hw_choose_driver(optarg) != 0) { -- 2.1.3 From s.l-h at gmx.de Fri Dec 12 23:00:11 2014 From: s.l-h at gmx.de (Stefan Lippers-Hollmann) Date: Sat, 13 Dec 2014 00:00:11 +0100 Subject: [Pkg-lirc-maint] [PATCH 08/13] irsimreceive: fix FTBS with -Werror=format-security enabled In-Reply-To: References: Message-ID: <665282644ecdec0d6bfd48034a5a6546ff22d7e9.1418422770.git.s.l-h@gmx.de> gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I.. -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o irsimreceive.o irsimreceive.c irsimreceive.c: In function 'main': irsimreceive.c:143:4: error: format not a string literal and no format arguments [-Werror=format-security] printf(USAGE); ^ irsimreceive.c:159:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, USAGE); ^ Signed-off-by: Stefan Lippers-Hollmann --- tools/irsimreceive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/irsimreceive.c b/tools/irsimreceive.c index 4a5a3b8..b74ad9c 100644 --- a/tools/irsimreceive.c +++ b/tools/irsimreceive.c @@ -140,7 +140,7 @@ int main(int argc, char *argv[]) != EOF) { switch (c) { case 'h': - printf(USAGE); + printf("%s", USAGE); return (EXIT_SUCCESS); case 'v': printf("%s\n", "irw " VERSION); @@ -156,7 +156,7 @@ int main(int argc, char *argv[]) } } if (argc != optind + 2) { - fprintf(stderr, USAGE); + fprintf(stderr, "%s", USAGE); return EXIT_FAILURE; } lirc_log_get_clientlog("irsimreceive", path, sizeof(path)); -- 2.1.3 From s.l-h at gmx.de Fri Dec 12 23:00:07 2014 From: s.l-h at gmx.de (Stefan Lippers-Hollmann) Date: Sat, 13 Dec 2014 00:00:07 +0100 Subject: [Pkg-lirc-maint] [PATCH 04/13] irsend: fix FTBS with -Werror=format-security enabled In-Reply-To: References: Message-ID: gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I.. -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o irsend.o irsend.c irsend.c: In function 'main': irsend.c:120:4: error: format not a string literal and no format arguments [-Werror=format-security] printf(help); ^ Signed-off-by: Stefan Lippers-Hollmann --- tools/irsend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/irsend.c b/tools/irsend.c index 71cc95f..e5f00f3 100644 --- a/tools/irsend.c +++ b/tools/irsend.c @@ -117,7 +117,7 @@ int main(int argc, char **argv) break; switch (c) { case 'h': - printf(help); + printf("%s", help); return (EXIT_SUCCESS); case 'v': printf("%s %s\n", prog, VERSION); -- 2.1.3 From s.l-h at gmx.de Fri Dec 12 23:00:09 2014 From: s.l-h at gmx.de (Stefan Lippers-Hollmann) Date: Sat, 13 Dec 2014 00:00:09 +0100 Subject: [Pkg-lirc-maint] [PATCH 06/13] irtestcase: fix FTBS with -Werror=format-security enabled In-Reply-To: References: Message-ID: gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I.. -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o irtestcase.o irtestcase.c irtestcase.c: In function 'irtestcase': irtestcase.c:184:3: error: format not a string literal and no format arguments [-Werror=format-security] printf(code); ^ irtestcase.c:188:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(code_log, code); ^ irtestcase.c: In function 'main': irtestcase.c:225:4: error: format not a string literal and no format arguments [-Werror=format-security] printf(USAGE); ^ Signed-off-by: Stefan Lippers-Hollmann --- tools/irtestcase.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/irtestcase.c b/tools/irtestcase.c index 95d59b7..5223737 100644 --- a/tools/irtestcase.c +++ b/tools/irtestcase.c @@ -181,11 +181,11 @@ static int irtestcase(int fd_io, int fd_cmd) } } while (nextcode(fd_io, code, sizeof(code)) == 1) { - printf(code); + printf("%s", code); if (strstr(code, "__EOF") != NULL) { exit(0); } - fprintf(code_log, code); + fprintf(code_log, "%s", code); if (opt_lircrc != NULL){ r = lirc_code2char(config, code, &c); while (r == 0 && c != NULL) { @@ -222,7 +222,7 @@ int main(int argc, char *argv[]) opt_testdata = optarg; break; case 'h': - printf(USAGE); + printf("%s", USAGE); return (EXIT_SUCCESS); case 'v': printf("%s\n", "irtestcase " VERSION); -- 2.1.3