[PATCH] server: Allocate enough space for the backslash in dup_nt_name() (Valgrind).
Zebediah Figura
zfigura at codeweavers.com
Thu Jan 20 16:12:32 CST 2022
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
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] != '\\' &&
--
2.34.1
More information about the wine-devel
mailing list