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

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2022-01-20 16:12:32 -06:00 committed by Alexandre Julliard
parent 6fe37b4656
commit 7b32a327f8
1 changed files with 1 additions and 1 deletions

View File

@ -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] != '\\' &&