shell32: Allocate returned array in IKnownFolderManager::GetFolderIds.

This commit is contained in:
Andrew Eikum 2015-04-08 10:59:33 -05:00 committed by Alexandre Julliard
parent 3d30db2248
commit e4868d5635
1 changed files with 2 additions and 1 deletions

View File

@ -4178,7 +4178,8 @@ static HRESULT WINAPI foldermanager_GetFolderIds(
TRACE("%p, %p\n", ppKFId, pCount);
*ppKFId = fm->ids;
*ppKFId = CoTaskMemAlloc(fm->num_ids * sizeof(KNOWNFOLDERID));
memcpy(*ppKFId, fm->ids, fm->num_ids * sizeof(KNOWNFOLDERID));
*pCount = fm->num_ids;
return S_OK;
}