Alexandre Julliard : shell32: Avoid zeroing a buffer that will get overwritten.

Alexandre Julliard julliard at winehq.org
Mon Aug 28 14:05:17 CDT 2017


Module: wine
Branch: master
Commit: feac70c1cf8e69469f8e35122a4fe7d23e6955f7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=feac70c1cf8e69469f8e35122a4fe7d23e6955f7

Author: Alexandre Julliard <julliard at 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 at 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);




More information about the wine-cvs mailing list