[vlc-commits] actions: Remove VLA usage
Hugo Beauzée-Luyssen
git at videolan.org
Fri Dec 11 12:15:47 UTC 2020
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Dec 10 17:14:54 2020 +0100| [8d6ce1be1c25d6372ae8aa8f578cec833c4da8f2] | committer: Hugo Beauzée-Luyssen
actions: Remove VLA usage
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8d6ce1be1c25d6372ae8aa8f578cec833c4da8f2
---
src/misc/actions.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/misc/actions.c b/src/misc/actions.c
index ddbf04ad65..5b6e081f1c 100644
--- a/src/misc/actions.c
+++ b/src/misc/actions.c
@@ -601,7 +601,8 @@ size_t
vlc_actions_get_keycodes(vlc_object_t *p_obj, const char *psz_key_name,
bool b_global, uint_fast32_t **pp_keycodes)
{
- char varname[12 /* "global-key-" */ + strlen( psz_key_name )];
+ assert(strlen( psz_key_name ) <= MAXACTION);
+ char varname[12 /* "global-key-" */ + MAXACTION];
sprintf( varname, "%skey-%s", b_global ? "global-" : "", psz_key_name );
*pp_keycodes = NULL;
More information about the vlc-commits
mailing list