[PATCH 3/4] quartz: fix crash in FilterGraph2_Render

Nikolay Sivov bunglehead at gmail.com
Fri Jun 2 01:30:43 CDT 2017


On 02.06.2017 2:41, Miklós Máté wrote:
> On 31/05/17 16:32, Andrew Eikum wrote:
>> Can you add a test for this?
>>
>> Andrew
> Hi,
> 
> I see no existing tests for invalid argument handling or for error
> handling in general. I could certainly add a line in the filtergraph
> test, but it wouldn't be the right thing. The right thing would be to
> autogenerate null pointer handling tests for _all_ interfaces that
> receive pointer arguments. Unfortunately, I don't have the resources to
> do that now.

It's done one by one, and most of the time after something crashed.
Autogenerated way will cover more definitely, but it's usually not that
simple, because some arguments could be optional, and for some Windows
crashes as well, so we should too.

> 
> MM
> 
>>
>> On Thu, May 25, 2017 at 04:54:49PM +0200, Miklós Máté wrote:
>>> Note: there are a lot of other places as well where the null pointer
>>> handling
>>> is present in the msdn docs but missing in wine.
>>>
>>> Signed-off-by: Miklós Máté <mtmkls at gmail.com>
>>> ---
>>>   dlls/quartz/filtergraph.c | 3 +++
>>>   1 file changed, 3 insertions(+)
>>>
>>> diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
>>> index a143b05d83..e26eb199c8 100644
>>> --- a/dlls/quartz/filtergraph.c
>>> +++ b/dlls/quartz/filtergraph.c
>>> @@ -1279,6 +1279,9 @@ static HRESULT WINAPI
>>> FilterGraph2_Render(IFilterGraph2 *iface, IPin *ppinOut)
>>>         TRACE("(%p/%p)->(%p)\n", This, iface, ppinOut);
>>>   +    if (!ppinOut)
>>> +        return E_POINTER;
>>> +
>>>       if (TRACE_ON(quartz))
>>>       {
>>>           PIN_INFO PinInfo;
>>> -- 
>>> 2.11.0
>>>
>>>
>>>
> 
> 
> 




More information about the wine-devel mailing list