mirror of
https://github.com/azure-rtos/netxduo.git
synced 2025-10-14 02:58:01 +08:00
Insert a index position check before getting bytes
This commit is contained in:
@@ -5811,6 +5811,12 @@ ULONG temp_lsw = 0;
|
||||
index += 4;
|
||||
}
|
||||
|
||||
/* Check option length for 4 bytes lsw. */
|
||||
if (index + 4 > option_length)
|
||||
{
|
||||
return(NX_DHCPV6_INVALID_SERVER_DUID);
|
||||
}
|
||||
|
||||
/* Yes; Extract the link local address lsw which should be the next 4 bytes. */
|
||||
_nx_dhcpv6_utility_get_data((option_data + index), 4, &temp_lsw);
|
||||
|
||||
|
Reference in New Issue
Block a user