Fix 1-byte buffer overflow in relay_reply4()

Potential SIGSEGV when using DHCPv4-relay.

Thanks to Asim Viladi Oglu Manizada for finding this.
This commit is contained in:
Simon Kelley committed 2026-04-06 22:22:43 +01:00
1 parent a6069da373
commit 9ad74926d4
1 file changed
+1 -1
+1 -1
View File
@@ -3248,7 +3248,7 @@ unsigned int relay_reply4(struct dhcp_packet *mess, size_t sz, char *arrival_int
/* delete agent info before return RFC 3046 para 2.1 */
*opt = OPTION_END;
memset(opt + 1, 0, option_len(opt) + 2);
memset(opt + 1, 0, option_len(opt) + 1);
}
}
else if (mess->giaddr.s_addr == relay->local.addr4.s_addr)