From 7d48271bd6fac11e99c2c1c48009615603342560 Mon Sep 17 00:00:00 2001 From: dibdot Date: Fri, 4 Jul 2014 21:46:54 +0200 Subject: [PATCH] Create 110-format_security_fix.patch Trivial patch to fix format security in etherwake source. --- .../patches/110-format_security_fix.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 net/etherwake/patches/110-format_security_fix.patch diff --git a/net/etherwake/patches/110-format_security_fix.patch b/net/etherwake/patches/110-format_security_fix.patch new file mode 100644 index 000000000..e937fb341 --- /dev/null +++ b/net/etherwake/patches/110-format_security_fix.patch @@ -0,0 +1,19 @@ +--- a/ether-wake.c ++++ b/ether-wake.c +@@ -135,7 +135,7 @@ int main(int argc, char *argv[]) + case 'D': debug++; break; + case 'i': ifname = optarg; break; + case 'p': get_wol_pw(optarg); break; +- case 'u': printf(usage_msg); return 0; ++ case 'u': printf("%s\n", usage_msg); return 0; + case 'v': verbose++; break; + case 'V': do_version++; break; + case '?': +@@ -144,7 +144,7 @@ int main(int argc, char *argv[]) + if (verbose || do_version) + printf("%s\n", version_msg); + if (errflag) { +- fprintf(stderr, brief_usage_msg); ++ fprintf(stderr, "%s\n", brief_usage_msg); + return 3; + }