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

Rémi Denis-Courmont remi at remlab.net
Fri Dec 4 08:55:27 CET 2020


No, I replaced an antilogy with an assertion.

Le 4 décembre 2020 08:57:58 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>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).
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201204/eb70cf92/attachment-0001.html>


More information about the vlc-devel mailing list