Package: etherwake / 1.09-4

fix-hardening.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Fix the pointer targets in initialization which differ in signedness
--- a/ether-wake.c
+++ b/ether-wake.c
@@ -131,7 +131,7 @@
 		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",usage_msg); return 0;
 		case 'v': verbose++;		break;
 		case 'V': do_version++;		break;
 		case '?':
@@ -140,7 +140,7 @@
 	if (verbose || do_version)
 		printf("%s\n", version_msg);
 	if (errflag) {
-		fprintf(stderr, brief_usage_msg);
+		fprintf(stderr,"%s", brief_usage_msg);
 		return 3;
 	}
 
@@ -181,7 +181,7 @@
 	   The code to retrieve the local station address is Linux specific. */
 	if (! opt_no_src_addr) {
 		struct ifreq if_hwaddr;
-		unsigned char *hwaddr = if_hwaddr.ifr_hwaddr.sa_data;
+		const char *hwaddr = if_hwaddr.ifr_hwaddr.sa_data;
 
 		strcpy(if_hwaddr.ifr_name, ifname);
 		if (ioctl(s, SIOCGIFHWADDR, &if_hwaddr) < 0) {