ntdll: Account for null terminating char in unload traces (Coverity).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2019-04-30 12:26:26 +03:00 committed by Alexandre Julliard
parent 4c5dd0e513
commit 9fcb2c8822
1 changed files with 1 additions and 1 deletions

View File

@ -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;