From: Thomas Weißschuh Date: Wed, 13 Sep 2023 04:32:52 +0000 (+0200) Subject: buildsys: warn on usage of alloca() X-Git-Tag: v2.40-rc1~246^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a91b213ce932529874c8deb0040f4794dbfe9d2;p=thirdparty%2Futil-linux.git buildsys: warn on usage of alloca() alloca() is susceptible to security issues, ensure it is not introduced. Signed-off-by: Thomas Weißschuh --- diff --git a/configure.ac b/configure.ac index 4e8a407b8e..b9109c1592 100644 --- a/configure.ac +++ b/configure.ac @@ -157,6 +157,7 @@ UL_WARN_ADD([-Wunused-parameter]) UL_WARN_ADD([-Wunused-result]) UL_WARN_ADD([-Wunused-variable]) UL_WARN_ADD([-Wvla]) +UL_WARN_ADD([-Walloca]) AC_ARG_ENABLE([werror], AS_HELP_STRING([--enable-werror], [make all compiler warnings into errors]), diff --git a/meson.build b/meson.build index c00844a3bd..9034c32ce6 100644 --- a/meson.build +++ b/meson.build @@ -877,6 +877,7 @@ compiler_flags = [ '-Wunused-result', '-Wunused-variable', '-Wvla', + '-Walloca', ] foreach compiler_flag : compiler_flags if cc.has_argument(compiler_flag)