Commit 7b32a327 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

server: Allocate enough space for the backslash in dup_nt_name() (Valgrind).

parent 6fe37b46
......@@ -1867,7 +1867,7 @@ static WCHAR *dup_nt_name( struct fd *root, struct unicode_str name, data_size_t
name.str++;
name.len -= sizeof(WCHAR);
}
if ((ret = malloc( retlen + name.len + 1 )))
if ((ret = malloc( retlen + name.len + sizeof(WCHAR) )))
{
memcpy( ret, root->nt_name, root->nt_namelen );
if (name.len && name.str[0] != '\\' &&
......
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