[Dnsmasq-discuss] Segfault when dhcp-lease-max reached
Tsachi
tsachi.kimel at gmail.com
Thu Apr 11 12:56:13 BST 2013
Hey,
I am working with dnsmasq 2.61 and came across a potential issue:
Connecting with a 3rd client when dhcp-lease-max is set to 2 (for example),
causes dnsmasq to exit with segfault.
Looking at the code, it seems that the lease_allocate might return a NULL
pointer which then can be referenced in lease4_allocate.
This code looks the same in v2.65
struct dhcp_lease *lease_allocate(void)
{
struct dhcp_lease *lease;
if (!leases_left || !(lease = whine_malloc(sizeof(struct dhcp_lease))))
return NULL;
.
.
.
struct dhcp_lease *lease4_allocate(struct in_addr addr)
{
struct dhcp_lease *lease = lease_allocate();
lease->addr = addr;
.
.
.
Thanks,
Tsachi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20130411/f39d62cf/attachment.html>
More information about the Dnsmasq-discuss
mailing list