[PATCH] ntdll: Make sure unix_name is zero terminated (valgrind).

Rémi Bernon rbernon at codeweavers.com
Thu Apr 22 01:21:11 CDT 2021


In nt_to_unix_file_name_no_root.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 dlls/ntdll/unix/file.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index a8078356fc6..8ac3d3d07ce 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -3290,6 +3290,7 @@ static NTSTATUS nt_to_unix_file_name_no_root( const UNICODE_STRING *nameW, char
         free( unix_name );
         return STATUS_OBJECT_NAME_INVALID;
     }
+    unix_name[pos + ret] = 0;
 
     if (prefix_len == name_len)  /* no subdir, plain DOS device */
     {
-- 
2.31.0




More information about the wine-devel mailing list