From 130ec9dbf9e1ff70f6a6817dc325d24b7a3b568b Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 12 Oct 2021 12:53:11 +0200 Subject: [PATCH] explorer: Use the correct buffer size for the full path name. Signed-off-by: Alexandre Julliard --- programs/explorer/explorer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/explorer/explorer.c b/programs/explorer/explorer.c index 43bd4ef13a8..cb0d63fb688 100644 --- a/programs/explorer/explorer.c +++ b/programs/explorer/explorer.c @@ -404,7 +404,7 @@ static void make_explorer_window(parameters_struct *params) if (params->root[0]) { size = GetFullPathNameW(params->root, 0, NULL, NULL); - path = malloc(size); + path = malloc( size * sizeof(WCHAR) ); GetFullPathNameW(params->root, size, path, NULL); }