[Dnsmasq-discuss] Segfault when dhcp-lease-max reached
tsachi.kimel at gmail.com
Thu Apr 11 12:56:13 BST 2013
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))))
struct dhcp_lease *lease4_allocate(struct in_addr addr)
struct dhcp_lease *lease = lease_allocate();
lease->addr = addr;
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dnsmasq-discuss