https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fad9f6677a8408ec94684…
commit fad9f6677a8408ec94684a1061341362a35b7396
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Thu Dec 13 20:40:05 2018 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Thu Dec 13 20:40:05 2018 +0900
[BROWSEUI] Follow up of #1121
CORE-15434
---
dll/win32/shell32/dialogs/dialogs.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dll/win32/shell32/dialogs/dialogs.cpp
b/dll/win32/shell32/dialogs/dialogs.cpp
index f2fce61fd9..5903fe4b31 100644
--- a/dll/win32/shell32/dialogs/dialogs.cpp
+++ b/dll/win32/shell32/dialogs/dialogs.cpp
@@ -578,7 +578,7 @@ static INT_PTR CALLBACK RunDlgProc(HWND hwnd, UINT message, WPARAM
wParam, LPARA
if (wcschr(psz, L'%') != NULL)
{
- cchExpand = ExpandEnvironmentStringsW(psz, NULL, 0) + 1;
+ cchExpand = ExpandEnvironmentStringsW(psz, NULL, 0);
pszExpanded = (WCHAR*)HeapAlloc(GetProcessHeap(), 0, cchExpand *
sizeof(WCHAR));
if (!pszExpanded)
{