ole32: Check for NULL parameter in ReleaseStgMedium().
libcef can call ReleaseStgMedium( NULL ) Signed-off-by: Chao Long <longchao@uniontech.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c1c86f6686
commit
3956b52603
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue