Skip to content
Snippets Groups Projects
Commit 3956b526 authored by Chao Long's avatar Chao Long Committed by Alexandre Julliard
Browse files

ole32: Check for NULL parameter in ReleaseStgMedium().


libcef can call ReleaseStgMedium( NULL )

Signed-off-by: default avatarChao Long <longchao@uniontech.com>
Signed-off-by: default avatarHuw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent c1c86f66
No related branches found
No related tags found
No related merge requests found
......@@ -2023,6 +2023,8 @@ found:
void WINAPI ReleaseStgMedium(
STGMEDIUM* pmedium)
{
if (!pmedium) return;
switch (pmedium->tymed)
{
case TYMED_HGLOBAL:
......
......@@ -4610,6 +4610,11 @@ static void test_OleCreateStaticFromData(void)
IStorage_Release(storage);
}
static void test_ReleaseStgMedium( void )
{
ReleaseStgMedium( NULL );
}
START_TEST(ole2)
{
DWORD dwRegister;
......@@ -4661,6 +4666,7 @@ START_TEST(ole2)
test_data_cache_save_data();
test_data_cache_contents();
test_OleCreateStaticFromData();
test_ReleaseStgMedium();
CoUninitialize();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment