mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
[IPHLPAPI] Fix broken size computation leading to buffer overrun
This commit is contained in:
parent
559297fe81
commit
159f5b676a
1 changed files with 2 additions and 2 deletions
|
@ -1015,7 +1015,7 @@ PMIB_TCPTABLE_OWNER_MODULE getOwnerModTcpTable(void)
|
||||||
|
|
||||||
IpOwnerModTcpTable = HeapAlloc
|
IpOwnerModTcpTable = HeapAlloc
|
||||||
( GetProcessHeap(), 0,
|
( GetProcessHeap(), 0,
|
||||||
sizeof(DWORD) + (sizeof(PMIB_TCPROW_OWNER_MODULE) * totalNumber) );
|
sizeof(DWORD) + (sizeof(MIB_TCPROW_OWNER_MODULE) * totalNumber) );
|
||||||
if (!IpOwnerModTcpTable) {
|
if (!IpOwnerModTcpTable) {
|
||||||
closeTcpFile(tcpFile);
|
closeTcpFile(tcpFile);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1034,7 +1034,7 @@ PMIB_TCPTABLE_OWNER_MODULE getOwnerModTcpTable(void)
|
||||||
CO_TL_ENTITY,
|
CO_TL_ENTITY,
|
||||||
entitySet[i].tei_instance,
|
entitySet[i].tei_instance,
|
||||||
0,
|
0,
|
||||||
sizeof(PMIB_TCPROW_OWNER_MODULE),
|
sizeof(MIB_TCPROW_OWNER_MODULE),
|
||||||
(PVOID *)&AdapterOwnerModTcpTable,
|
(PVOID *)&AdapterOwnerModTcpTable,
|
||||||
&returnSize );
|
&returnSize );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue