diff --git a/reactos/base/applications/network/tracert/tracert.c b/reactos/base/applications/network/tracert/tracert.c index 4ec2508fa64..e3c1048f7be 100644 --- a/reactos/base/applications/network/tracert/tracert.c +++ b/reactos/base/applications/network/tracert/tracert.c @@ -422,7 +422,7 @@ AllocateBuffers(PAPPINFO pInfo) pInfo->RecvPacket = (PIPv4_HEADER)HeapAlloc(GetProcessHeap(), 0, - sizeof(IPv4_HEADER) + PACKET_SIZE); + MAX_PING_PACKET_SIZE); if (!pInfo->RecvPacket) { HeapFree(GetProcessHeap(), diff --git a/reactos/dll/ntdll/ldr/utils.c b/reactos/dll/ntdll/ldr/utils.c index 30373f35848..1cfb8c85505 100644 --- a/reactos/dll/ntdll/ldr/utils.c +++ b/reactos/dll/ntdll/ldr/utils.c @@ -256,7 +256,7 @@ LdrpQueryAppPaths(IN PCWSTR ImageName) /* Copy it to the heap allocd memory */ Path = RtlAllocateHeap(RtlGetProcessHeap(), 0, - wcslen(SearchPathBuffer) * sizeof(WCHAR)); + (wcslen(SearchPathBuffer) + 1) * sizeof(WCHAR)); if (!Path) { diff --git a/reactos/dll/win32/netcfgx/tcpipconf_notify.c b/reactos/dll/win32/netcfgx/tcpipconf_notify.c index 14b9a4ab2f4..5238d60c72e 100644 --- a/reactos/dll/win32/netcfgx/tcpipconf_notify.c +++ b/reactos/dll/win32/netcfgx/tcpipconf_notify.c @@ -2860,7 +2860,7 @@ Initialize(TcpipConfNotifyImpl * This) } pCurSettings->AutoconfigActive = pPerInfo->AutoconfigActive; } - CoTaskMemFree(pInfo); + CoTaskMemFree(pPerInfo); } }