mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Fix crash with empty DHCP string options.
This commit is contained in:
@@ -1833,7 +1833,8 @@ static int do_opt(struct dhcp_opt *opt, unsigned char *p, struct dhcp_context *c
|
||||
}
|
||||
}
|
||||
else
|
||||
memcpy(p, opt->val, len);
|
||||
/* empty string may be extended to "\0" by null_term */
|
||||
memcpy(p, opt->val ? opt->val : (unsigned char *)"", len);
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user