mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:15:59 +00:00
[IPHLPAPI] Check pointers when returning module info from specific connection
This commit is contained in:
parent
22f60faf43
commit
93b0957641
1 changed files with 12 additions and 0 deletions
|
@ -2293,6 +2293,12 @@ static DWORD GetOwnerModuleFromPidEntry(DWORD OwningPid, TCPIP_OWNER_MODULE_INFO
|
|||
WCHAR File[MAX_PATH], Path[MAX_PATH];
|
||||
PTCPIP_OWNER_MODULE_BASIC_INFO BasicInfo;
|
||||
|
||||
if (IsBadWritePtr(pdwSize, sizeof(DWORD)) ||
|
||||
IsBadWritePtr(Buffer, *pdwSize))
|
||||
{
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (OwningPid == 0)
|
||||
{
|
||||
return ERROR_NOT_FOUND;
|
||||
|
@ -2363,6 +2369,12 @@ static DWORD GetOwnerModuleFromTagEntry(DWORD OwningPid, DWORD OwningTag, TCPIP_
|
|||
PWSTR Buffer;
|
||||
} ServiceQuery;
|
||||
|
||||
if (IsBadWritePtr(pdwSize, sizeof(DWORD)) ||
|
||||
IsBadWritePtr(Buffer, *pdwSize))
|
||||
{
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
/* First, secure (avoid injections) load advapi32.dll */
|
||||
Size = GetSystemDirectoryW(SysDir, MAX_PATH);
|
||||
if (Size == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue