Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/native/corehost/comhost/comhost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ COM_API HRESULT STDMETHODCALLTYPE DllGetClassObject(
_In_ REFIID riid,
_Outptr_ LPVOID FAR* ppv)
{
if (ppv == nullptr)
return E_POINTER;

// COM out parameters must always be initialized, including on failure paths.
*ppv = nullptr;
Comment thread
AaronRobinsonMSFT marked this conversation as resolved.

// Check if the CLSID map contains a mapping
clsid_map map;
RETURN_HRESULT_IF_EXCEPT(map = comhost::get_clsid_map());
Expand Down
Loading