mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Small sanity check in wildcard tag matching code.
This commit is contained in:
committed by
Simon Kelley
parent
e0ce3c12f2
commit
dea69a12aa
@@ -88,7 +88,7 @@ int match_netid_wild(struct dhcp_netid *check, struct dhcp_netid *pool)
|
|||||||
for (; check; check = check->next)
|
for (; check; check = check->next)
|
||||||
{
|
{
|
||||||
const int check_len = strlen(check->net);
|
const int check_len = strlen(check->net);
|
||||||
const int is_wc = (check->net[check_len - 1] == '*');
|
const int is_wc = (check_len > 0 && check->net[check_len - 1] == '*');
|
||||||
|
|
||||||
/* '#' for not is for backwards compat. */
|
/* '#' for not is for backwards compat. */
|
||||||
if (check->net[0] != '!' && check->net[0] != '#')
|
if (check->net[0] != '!' && check->net[0] != '#')
|
||||||
|
|||||||
Reference in New Issue
Block a user