[vlc-devel] [PATCH] csa: do not handle impossible NULL argument

Steve Lhomme robux4 at ycbcr.xyz
Fri Dec 4 07:57:58 CET 2020


On 2020-12-03 18:54, Rémi Denis-Courmont wrote:
> Le torstaina 3. joulukuuta 2020, 19.36.58 EET Steve Lhomme a écrit :
>> On 2020-12-03 17:29, Rémi Denis-Courmont wrote:
>>> Le torstaina 3. joulukuuta 2020, 11.14.49 EET Steve Lhomme a écrit :
>>>> p_sys->csa in ts.c can be NULL (see csaSetup()) and the ts code will
>>>> work fine. So the NULL case is very much used (and I believe the common
>>>> case).
>>>
>>> I don't know what code base you are referring to. csa_UseKey() has a
>>> single
>>> call site in vlc.git and that's the one getting patched here.
>>
>> p_sys->csa in ts.c can still be NULL.
> 
> So what?

So you just replaced a NULL check (that happens 99.9% of the time) by an 
assert that will crash all 99.9% of the time (either in the assert of 
the NULL de-reference).


More information about the vlc-devel mailing list