iphlpapi: Write an ERR if the sockaddr parsing went wrong.

It should not happen any more after the previous patch but it is subtle
enough that I think being verbose about it makes sense.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Stefan Dösinger 2020-04-12 14:24:55 +02:00 committed by Alexandre Julliard
parent 594dfe6875
commit 7f4beb0883
1 changed files with 6 additions and 0 deletions

View File

@ -1539,6 +1539,12 @@ DWORD WINAPI AllocateAndGetIpForwardTableFromStack(PMIB_IPFORWARDTABLE *ppIpForw
continue;
sa = (struct sockaddr *)addrPtr;
if (addrPtr + sa->sa_len > next + rtm->rtm_msglen)
{
ERR ("struct sockaddr extends beyond the route message, %p > %p\n",
addrPtr + sa->sa_len, next + rtm->rtm_msglen );
}
ADVANCE (addrPtr, sa);
/* default routes are encoded by length-zero sockaddr */