From 159f5b676ab749064dfafe60d712e979537d9a1a Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Tue, 27 Nov 2018 22:57:30 +0100 Subject: [PATCH] [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 f26c43a4fed..84351ea9a08 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 );