[vlc-devel] [PATCH 02/14] src: add cleaner md5 API

Rémi Denis-Courmont remi at remlab.net
Thu Apr 2 13:51:01 CEST 2020


How do you allocate a variable size object without error checks, and potentially inside a compound? You're just moving the problem to the caller.

Le 2 avril 2020 12:25:26 GMT+03:00, Francois Cartegnie <fcvlcdev at free.fr> a écrit :
>Le 02/04/2020 à 08:17, Rémi Denis-Courmont a écrit :
>> Hi,
>> 
>> If you add a parameter, there's no way to make the init function not
>allocate memory and return void. I much prefer this specific Nettle
>style over the generic gcrypt style (at least in C).
>
>nothing prevents having a 2 step setup to query buffer size and
>validate
>support, then feed init with proper buffer.
>
>
>-- 
>Francois Cartegnie
>VideoLAN - VLC Developer
>_______________________________________________
>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/20200402/799565f1/attachment.html>


More information about the vlc-devel mailing list