[vlc-devel] [PATCH 1/2] actions: Fix MAXACTION value

Alexandre Janniaux ajanni at videolabs.io
Fri Dec 11 10:48:16 CET 2020


Hi,

Ah yes, LGTM,

Regards,
--
Alexandre Janniaux
Videolabs

On Fri, Dec 11, 2020 at 10:24:21AM +0100, Hugo Beauzée-Luyssen wrote:
> On Thu, Dec 10, 2020, at 5:23 PM, Alexandre Janniaux wrote:
> > Hi,
> >
> > Isn't it because "global-key-" is 11 characters but we add
> > 12 in the next patch?
> >
>
> That guarantees that varname will have enough space to perform the copy, but sprintf might run past the last caracter since there's no room for the terminal null byte. There are other locations in this file where we use s_names2actions.psz directly
>
> I suppose it doesn't blow off because there is padding between the psz and id fields, and since the variable is static, that padding will be initialized to 0
>
> --
>   Hugo Beauzée-Luyssen
>   hugo at beauzee.fr
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list