https://git.reactos.org/?p=reactos.git;a=commitdiff;h=159f5b676ab749064dfaf…
commit 159f5b676ab749064dfafe60d712e979537d9a1a
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Tue Nov 27 22:57:30 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Tue Nov 27 23:12:57 2018 +0100
[IPHLPAPI] Fix broken size computation leading to buffer overrun
---
dll/win32/iphlpapi/ipstats_reactos.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dll/win32/iphlpapi/ipstats_reactos.c b/dll/win32/iphlpapi/ipstats_reactos.c
index f26c43a4fe..84351ea9a0 100644
--- a/dll/win32/iphlpapi/ipstats_reactos.c
+++ b/dll/win32/iphlpapi/ipstats_reactos.c
@@ -1015,7 +1015,7 @@ PMIB_TCPTABLE_OWNER_MODULE getOwnerModTcpTable(void)
IpOwnerModTcpTable = HeapAlloc
( GetProcessHeap(), 0,
- sizeof(DWORD) + (sizeof(PMIB_TCPROW_OWNER_MODULE) * totalNumber) );
+ sizeof(DWORD) + (sizeof(MIB_TCPROW_OWNER_MODULE) * totalNumber) );
if (!IpOwnerModTcpTable) {
closeTcpFile(tcpFile);
return NULL;
@@ -1034,7 +1034,7 @@ PMIB_TCPTABLE_OWNER_MODULE getOwnerModTcpTable(void)
CO_TL_ENTITY,
entitySet[i].tei_instance,
0,
- sizeof(PMIB_TCPROW_OWNER_MODULE),
+ sizeof(MIB_TCPROW_OWNER_MODULE),
(PVOID *)&AdapterOwnerModTcpTable,
&returnSize );