From 2a91b213ce932529874c8deb0040f4794dbfe9d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Wed, 13 Sep 2023 06:32:52 +0200 Subject: [PATCH] buildsys: warn on usage of alloca() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit alloca() is susceptible to security issues, ensure it is not introduced. Signed-off-by: Thomas Weißschuh --- configure.ac | 1 + meson.build | 1 + 2 files changed, 2 insertions(+) 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) -- 2.47.2