Commit a7937e83 authored by Tim Clem's avatar Tim Clem Committed by Alexandre Julliard
Browse files

kernelbase: Don't assume the length of the process image name.

NtQueryInformationProcess(ProcessImageFileNameWin32) may return an
empty string in some circumstances, which leads
QueryFullProcessImageNameW to crash if called with flags including
PROCESS_NAME_NATIVE, as that path assumed the image name had a length
of at least 2.
parent 88f1d681
Pipeline #1127 skipped
......@@ -1575,7 +1575,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH QueryFullProcessImageNameW( HANDLE process, DWORD
if (status) goto cleanup;
if (flags & PROCESS_NAME_NATIVE && result->Length > 2 * sizeof(WCHAR))
WCHAR drive[3];
WCHAR device[1024];
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment