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

RĂ©mi Denis-Courmont remi at remlab.net
Thu May 14 17:31:03 CEST 2020


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



More information about the vlc-devel mailing list