Browse Source

Create 110-format_security_fix.patch

Trivial patch to fix format security in etherwake source.
dibdot 10 years ago
parent
commit
7d48271bd6
1 changed files with 19 additions and 0 deletions
  1. 19
    0
      net/etherwake/patches/110-format_security_fix.patch

+ 19
- 0
net/etherwake/patches/110-format_security_fix.patch View File

@@ -0,0 +1,19 @@
1
+--- a/ether-wake.c
2
++++ b/ether-wake.c
3
+@@ -135,7 +135,7 @@ int main(int argc, char *argv[])
4
+ 		case 'D': debug++;			break;
5
+ 		case 'i': ifname = optarg;	break;
6
+ 		case 'p': get_wol_pw(optarg); break;
7
+-		case 'u': printf(usage_msg); return 0;
8
++		case 'u': printf("%s\n", usage_msg); return 0;
9
+ 		case 'v': verbose++;		break;
10
+ 		case 'V': do_version++;		break;
11
+ 		case '?':
12
+@@ -144,7 +144,7 @@ int main(int argc, char *argv[])
13
+ 	if (verbose || do_version)
14
+ 		printf("%s\n", version_msg);
15
+ 	if (errflag) {
16
+-		fprintf(stderr, brief_usage_msg);
17
++		fprintf(stderr, "%s\n", brief_usage_msg);
18
+ 		return 3;
19
+ 	}