Commit 9fcb2c88 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

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

parent 4c5dd0e5
...@@ -177,7 +177,7 @@ static unsigned int unload_trace_seq; ...@@ -177,7 +177,7 @@ static unsigned int unload_trace_seq;
static void module_push_unload_trace( const LDR_MODULE *ldr ) static void module_push_unload_trace( const LDR_MODULE *ldr )
{ {
RTL_UNLOAD_EVENT_TRACE *ptr = &unload_traces[unload_trace_seq]; 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->BaseAddress = ldr->BaseAddress;
ptr->SizeOfImage = ldr->SizeOfImage; ptr->SizeOfImage = ldr->SizeOfImage;
......
Markdown is supported
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