Commit fa4c7074 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

mstask: ITaskTrigger::SetTrigger() should fail on NULL input.

parent 340bf9b5
......@@ -103,6 +103,8 @@ static HRESULT WINAPI MSTASK_ITaskTrigger_SetTrigger(
TRACE("(%p, %p)\n", iface, pTrigger);
if (!pTrigger) return E_INVALIDARG;
/* Verify valid structure size */
if (pTrigger->cbTriggerSize != sizeof(*pTrigger))
return E_INVALIDARG;
......
......@@ -136,6 +136,9 @@ static void test_SetTrigger_GetTrigger(void)
hres = ITask_CreateTrigger(test_task, &idx, &test_trigger);
ok(hres == S_OK, "got %#x\n", hres);
hres = ITaskTrigger_SetTrigger(test_trigger, NULL);
ok(hres == E_INVALIDARG, "got %#x\n", hres);
/* Setup a trigger with base values for this test run */
GetLocalTime(&time);
empty_trigger_state.wStartHour = time.wHour;
......
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