]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
buildsys: warn on usage of alloca()
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 13 Sep 2023 04:32:52 +0000 (06:32 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Wed, 13 Sep 2023 06:37:02 +0000 (08:37 +0200)
alloca() is susceptible to security issues, ensure it is not
introduced.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
configure.ac
meson.build

index 4e8a407b8e56331aed57ebfe5dc0271286570acc..b9109c15926aaf4ae2a8fa40b31623e5de00e8b1 100644 (file)
@@ -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]),
index c00844a3bd1fd70608618810dcafa24fe690d26a..9034c32ce64d0d72061bbc2024bf397215e77773 100644 (file)
@@ -877,6 +877,7 @@ compiler_flags = [
   '-Wunused-result',
   '-Wunused-variable',
   '-Wvla',
+  '-Walloca',
 ]
 foreach compiler_flag : compiler_flags
   if cc.has_argument(compiler_flag)