mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
[SHELL32] Don't try to follow a null pointer inside CFSDropTarget, this fixes a crash in shell32:CFSFolder
svn path=/trunk/; revision=74995
This commit is contained in:
@@ -192,6 +192,9 @@ CFSDropTarget::CFSDropTarget():
|
||||
|
||||
HRESULT WINAPI CFSDropTarget::Initialize(LPWSTR PathTarget)
|
||||
{
|
||||
if (!PathTarget)
|
||||
return E_UNEXPECTED;
|
||||
|
||||
cfShellIDList = RegisterClipboardFormatW(CFSTR_SHELLIDLIST);
|
||||
if (!cfShellIDList)
|
||||
return E_FAIL;
|
||||
@@ -199,6 +202,7 @@ HRESULT WINAPI CFSDropTarget::Initialize(LPWSTR PathTarget)
|
||||
sPathTarget = (WCHAR *)SHAlloc((wcslen(PathTarget) + 1) * sizeof(WCHAR));
|
||||
if (!sPathTarget)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
wcscpy(sPathTarget, PathTarget);
|
||||
|
||||
return S_OK;
|
||||
|
||||
Reference in New Issue
Block a user