You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which technically is fine because id is an uint32_t. So it's not really a bug (our static analyzers would have complained a long time ago if that was the case).
What fix would you suggest? Setting the length to 4 or base it directly on client_hw_addr would similarly be an issue if id was smaller than 4. So maybe min(sizeof(dhcp->client_hw_addr)-2, sizeof(id))? Or even use a dynamic offset based on the size of id in relation to the size of client_hw_addr? That seems overly complicated for something that's not really an issue in the first place.
There is a bad memcpy() in prepare_dhcp(), dhcp_socket.c that works only for sizeof(id) <=4:
The text was updated successfully, but these errors were encountered: