[vlc-devel] [PATCH] config: allow 64-bits value in config chains

Steve Lhomme robux4 at ycbcr.xyz
Fri May 15 07:18:11 CEST 2020


OK

On 2020-05-14 17:31, RĂ©mi Denis-Courmont wrote:
> This matches the behaviour for command line arguments and for input
> item options. This also matches the bug that it might cause signed
> overflow if the code expects a 32-bits value.
> ---
>   src/config/chain.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/config/chain.c b/src/config/chain.c
> index 0debcaed63..608de1b3af 100644
> --- a/src/config/chain.c
> +++ b/src/config/chain.c
> @@ -399,8 +399,8 @@ void config_ChainParse( vlc_object_t *p_this, const char *psz_prefix,
>                   val.b_bool = b_yes;
>                   break;
>               case VLC_VAR_INTEGER:
> -                val.i_int = strtol( cfg->psz_value ? cfg->psz_value : "0",
> -                                    NULL, 0 );
> +                val.i_int = strtoll( cfg->psz_value ? cfg->psz_value : "0",
> +                                     NULL, 0 );
>                   break;
>               case VLC_VAR_FLOAT:
>                   val.f_float = us_atof( cfg->psz_value ? cfg->psz_value : "0" );
> -- 
> 2.26.2
> 
> _______________________________________________
> 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