Commit 15934680 authored by Michael Jung's avatar Michael Jung Committed by Alexandre Julliard

Return a cloned PIDL by SHBrowseForFolder to avoid heap corruption.

parent 94e5f012
......@@ -521,6 +521,7 @@ static BOOL BrsFolder_OnCommand( browse_info *info, UINT id )
switch (id)
{
case IDOK:
info->pidlRet = ILClone(info->pidlRet); /* The original pidl will be free'd. */
pdump( info->pidlRet );
if (lpBrowseInfo->pszDisplayName)
SHGetPathFromIDListW( info->pidlRet, lpBrowseInfo->pszDisplayName );
......@@ -664,8 +665,6 @@ LPITEMIDLIST WINAPI SHBrowseForFolderW (LPBROWSEINFOW lpbi)
browse_info info;
DWORD r;
ERR("%p\n", lpbi);
info.hWnd = 0;
info.pidlRet = NULL;
info.lpBrowseInfo = lpbi;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment