Commit 3956b526 authored by Chao Long's avatar Chao Long Committed by Alexandre Julliard

ole32: Check for NULL parameter in ReleaseStgMedium().

libcef can call ReleaseStgMedium( NULL ) Signed-off-by: 's avatarChao Long <longchao@uniontech.com> Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent c1c86f66
......@@ -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();
}
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