Debian Codegraph @

debian/patches/fix-hardening.patch

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