From feac70c1cf8e69469f8e35122a4fe7d23e6955f7 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 28 Aug 2017 18:13:09 +0200 Subject: [PATCH] shell32: Avoid zeroing a buffer that will get overwritten. Signed-off-by: Alexandre Julliard --- dlls/shell32/shfldr_fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c index c7259276d1d..c391aceb364 100644 --- a/dlls/shell32/shfldr_fs.c +++ b/dlls/shell32/shfldr_fs.c @@ -1315,9 +1315,10 @@ ISFHelper_fnCopyItems (ISFHelper * iface, IShellFolder * pSFFrom, UINT cidl, if (SUCCEEDED (IPersistFolder2_GetCurFolder (ppf2, &pidl))) { SHGetPathFromIDListW (pidl, wszSrcPathRoot); - ZeroMemory(wszDstPath, MAX_PATH+1); if (This->sPathTarget) lstrcpynW(wszDstPath, This->sPathTarget, MAX_PATH); + else + wszDstPath[0] = 0; PathAddBackslashW(wszSrcPathRoot); PathAddBackslashW(wszDstPath); wszSrcPathsList = build_paths_list(wszSrcPathRoot, cidl, apidl); -- 2.11.4.GIT