shell32: Initialize all of wszDstPath in ISFHelper_fnCopyItems. ISFHelper_fnCopyItems.
Gerald Pfeifer
gerald at pfeifer.com
Sun May 15 14:06:30 CDT 2016
wszDstPath is an array of WCHAR, which are wider than one byte,
so this should have been (MAXPATH+1)*sizeof(WCHAR) -- or the more
robust approach I here propose.
Gerald
Signed-off-by: Gerald Pfeifer <gerald at pfeifer.com>
---
dlls/shell32/shfldr_fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c
index d8bcb4c..31cb2fa 100644
--- a/dlls/shell32/shfldr_fs.c
+++ b/dlls/shell32/shfldr_fs.c
@@ -1317,7 +1317,7 @@ ISFHelper_fnCopyItems (ISFHelper * iface, IShellFolder * pSFFrom, UINT cidl,
if (SUCCEEDED (IPersistFolder2_GetCurFolder (ppf2, &pidl))) {
SHGetPathFromIDListW (pidl, wszSrcPathRoot);
- ZeroMemory(wszDstPath, MAX_PATH+1);
+ ZeroMemory(wszDstPath, sizeof(wszDstPath));
if (This->sPathTarget)
lstrcpynW(wszDstPath, This->sPathTarget, MAX_PATH);
PathAddBackslashW(wszSrcPathRoot);
--
2.8.1
More information about the wine-patches
mailing list