mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Additional syntax check on MAC wildcards.
This commit is contained in:
@@ -497,6 +497,10 @@ int parse_hex(char *in, unsigned char *out, int maxlen,
|
|||||||
sav = in[(j+1)*2];
|
sav = in[(j+1)*2];
|
||||||
in[(j+1)*2] = 0;
|
in[(j+1)*2] = 0;
|
||||||
}
|
}
|
||||||
|
/* checks above allow mix of hexdigit and *, which
|
||||||
|
is illegal. */
|
||||||
|
if (strchr(&in[j*2], '*'))
|
||||||
|
return -1;
|
||||||
out[i] = strtol(&in[j*2], NULL, 16);
|
out[i] = strtol(&in[j*2], NULL, 16);
|
||||||
mask = mask << 1;
|
mask = mask << 1;
|
||||||
i++;
|
i++;
|
||||||
|
|||||||
Reference in New Issue
Block a user