mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 08:54:05 +00:00
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.
This commit is contained in:
parent
88f1d681c1
commit
a7937e83b2
|
@ -1575,7 +1575,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH QueryFullProcessImageNameW( HANDLE process, DWORD
|
|||
|
||||
if (status) goto cleanup;
|
||||
|
||||
if (flags & PROCESS_NAME_NATIVE)
|
||||
if (flags & PROCESS_NAME_NATIVE && result->Length > 2 * sizeof(WCHAR))
|
||||
{
|
||||
WCHAR drive[3];
|
||||
WCHAR device[1024];
|
||||
|
|
Loading…
Reference in a new issue