[vlc-devel] [PATCH] demux/avi: fix 17581: do not call FromACP with NULL

Rémi Denis-Courmont remi at remlab.net
Tue Nov 1 13:56:59 CET 2016


Le tiistaina 1. marraskuuta 2016, 2.33.03 EET Filip Roséen a écrit :
> FromACP is used to convert a c-style string from one charset to the
> other, as such it does not make sense to call the function with NULL
> (especially given that NULL is not a valid input for the function).
> 
> These changes fixes the checks to see whether or not the function is
> applicable or not by properly checking the argument that would-be
> passed (instead of just the object that contains it).
> 
> fixes #17581

IMO, in this case, it seems simpler to accept NULL in local function 
FromACP().

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list