Alexandre Julliard : shell32: Avoid zeroing a buffer that will get overwritten.
Module: wine Branch: master Commit: feac70c1cf8e69469f8e35122a4fe7d23e6955f7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=feac70c1cf8e69469f8e35122a... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Aug 28 18:13:09 2017 +0200 shell32: Avoid zeroing a buffer that will get overwritten. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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 c725927..c391ace 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);
participants (1)
-
Alexandre Julliard