Andrey Turkin : ntdll: Handle invalid pointers in NtQueryInformationProcess (ProcessDebugObjectHandle).
Alexandre Julliard
julliard at winehq.org
Tue Oct 6 10:35:51 CDT 2009
Module: wine
Branch: master
Commit: f2432a8bc2dddaa34cfca0abbaf8b0d1ac19b44b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f2432a8bc2dddaa34cfca0abbaf8b0d1ac19b44b
Author: Andrey Turkin <andrey.turkin at gmail.com>
Date: Tue Oct 6 13:34:21 2009 +0400
ntdll: Handle invalid pointers in NtQueryInformationProcess(ProcessDebugObjectHandle).
---
dlls/ntdll/process.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index cae3f79..ba51df5 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -304,7 +304,14 @@ NTSTATUS WINAPI NtQueryInformationProcess(
* set it to 0 aka "no debugger" to satisfy copy protections */
len = sizeof(HANDLE);
if (ProcessInformationLength == len)
- memset(ProcessInformation, 0, ProcessInformationLength);
+ {
+ if (!ProcessInformation)
+ ret = STATUS_ACCESS_VIOLATION;
+ else if (!ProcessHandle)
+ ret = STATUS_INVALID_HANDLE;
+ else
+ memset(ProcessInformation, 0, ProcessInformationLength);
+ }
else
ret = STATUS_INFO_LENGTH_MISMATCH;
break;
More information about the wine-cvs
mailing list