From: Thomas Weißschuh Date: Tue, 12 Sep 2023 21:49:21 +0000 (+0200) Subject: buildsys: warn on usage of VLAs X-Git-Tag: v2.40-rc1~246^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a52f9bdd17777c9d1426221fb90803cbc0569d53;p=thirdparty%2Futil-linux.git buildsys: warn on usage of VLAs Variable-length-arrays are susceptible to security issues, ensure none are introduced. Signed-off-by: Thomas Weißschuh --- diff --git a/configure.ac b/configure.ac index 5f609dec74..4e8a407b8e 100644 --- a/configure.ac +++ b/configure.ac @@ -156,6 +156,7 @@ UL_WARN_ADD([-Wunused-but-set-variable]) UL_WARN_ADD([-Wunused-parameter]) UL_WARN_ADD([-Wunused-result]) UL_WARN_ADD([-Wunused-variable]) +UL_WARN_ADD([-Wvla]) AC_ARG_ENABLE([werror], AS_HELP_STRING([--enable-werror], [make all compiler warnings into errors]), diff --git a/meson.build b/meson.build index 8e3d6bb1d9..c00844a3bd 100644 --- a/meson.build +++ b/meson.build @@ -876,6 +876,7 @@ compiler_flags = [ '-Wunused-parameter', '-Wunused-result', '-Wunused-variable', + '-Wvla', ] foreach compiler_flag : compiler_flags if cc.has_argument(compiler_flag)