mirror of
https://github.com/reactos/wine.git
synced 2025-01-23 12:25:17 +00:00
dbghelp: Check wImageName for NULL (Coverity).
This commit is contained in:
parent
28c6c44df4
commit
d6f78e4014
@ -534,6 +534,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
|
||||
|
||||
if (Flags & SLMFLAG_VIRTUAL)
|
||||
{
|
||||
if (!wImageName) return FALSE;
|
||||
module = module_new(pcs, wImageName, module_get_type_by_name(wImageName),
|
||||
TRUE, (DWORD)BaseOfDll, SizeOfDll, 0, 0);
|
||||
if (!module) return FALSE;
|
||||
@ -594,7 +595,8 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
|
||||
*/
|
||||
if (wModuleName)
|
||||
module_set_module(module, wModuleName);
|
||||
lstrcpynW(module->module.ImageName, wImageName,
|
||||
if (wImageName)
|
||||
lstrcpynW(module->module.ImageName, wImageName,
|
||||
sizeof(module->module.ImageName) / sizeof(WCHAR));
|
||||
|
||||
return module->module.BaseOfImage;
|
||||
|
Loading…
x
Reference in New Issue
Block a user