Author: fireball
Date: Thu Oct 28 22:08:18 2010
New Revision: 49332
URL:
http://svn.reactos.org/svn/reactos?rev=49332&view=rev
Log:
Roel Messiant:
- Heap corruption fixes.
Modified:
trunk/reactos/base/applications/network/tracert/tracert.c
trunk/reactos/dll/ntdll/ldr/utils.c
trunk/reactos/dll/win32/netcfgx/tcpipconf_notify.c
Modified: trunk/reactos/base/applications/network/tracert/tracert.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/tracert/tracert.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/tracert/tracert.c [iso-8859-1] Thu Oct 28
22:08:18 2010
@@ -422,7 +422,7 @@
pInfo->RecvPacket = (PIPv4_HEADER)HeapAlloc(GetProcessHeap(),
0,
- sizeof(IPv4_HEADER) + PACKET_SIZE);
+ MAX_PING_PACKET_SIZE);
if (!pInfo->RecvPacket)
{
HeapFree(GetProcessHeap(),
Modified: trunk/reactos/dll/ntdll/ldr/utils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/utils.c?rev=…
==============================================================================
--- trunk/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] Thu Oct 28 22:08:18 2010
@@ -256,7 +256,7 @@
/* Copy it to the heap allocd memory */
Path = RtlAllocateHeap(RtlGetProcessHeap(),
0,
- wcslen(SearchPathBuffer) * sizeof(WCHAR));
+ (wcslen(SearchPathBuffer) + 1) * sizeof(WCHAR));
if (!Path)
{
Modified: trunk/reactos/dll/win32/netcfgx/tcpipconf_notify.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/tcpipcon…
==============================================================================
--- trunk/reactos/dll/win32/netcfgx/tcpipconf_notify.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netcfgx/tcpipconf_notify.c [iso-8859-1] Thu Oct 28 22:08:18
2010
@@ -2860,7 +2860,7 @@
}
pCurSettings->AutoconfigActive = pPerInfo->AutoconfigActive;
}
- CoTaskMemFree(pInfo);
+ CoTaskMemFree(pPerInfo);
}
}