Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/ntdll/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 994ff6f215..034b98cfee 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -177,7 +177,7 @@ static unsigned int unload_trace_seq; static void module_push_unload_trace( const LDR_MODULE *ldr ) { RTL_UNLOAD_EVENT_TRACE *ptr = &unload_traces[unload_trace_seq]; - unsigned int len = min(sizeof(ptr->ImageName), ldr->BaseDllName.Length); + unsigned int len = min(sizeof(ptr->ImageName) - sizeof(WCHAR), ldr->BaseDllName.Length);
ptr->BaseAddress = ldr->BaseAddress; ptr->SizeOfImage = ldr->SizeOfImage;