Module: wine Branch: master Commit: 7b32a327f898cb2a8225669a2b945f0f606bf19e URL: https://source.winehq.org/git/wine.git/?a=commit;h=7b32a327f898cb2a8225669a2...
Author: Zebediah Figura zfigura@codeweavers.com Date: Thu Jan 20 16:12:32 2022 -0600
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
---
server/fd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/fd.c b/server/fd.c index c9a21186722..1b4b98b0e76 100644 --- a/server/fd.c +++ b/server/fd.c @@ -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] != '\' &&