From e7a364d6107294718f655f27613f2b448e93ee35 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Sat, 27 May 2023 17:20:29 +0900 Subject: [PATCH] Specify _FORTIFY_SOURCE=3 (#2168) This can find more kinds of buffer overflows: https://developers.redhat.com/articles/2022/09/17/gccs-new-fortification-level --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4f870eb..f73b4e8 100644 --- a/configure.ac +++ b/configure.ac @@ -34,7 +34,7 @@ AC_CHECK_HEADERS([attr/xattr.h]) AC_CHECK_HEADERS([sys/extattr.h]) AC_CHECK_FUNCS([fallocate]) -CXXFLAGS="$CXXFLAGS -Wall -fno-exceptions -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2" +CXXFLAGS="$CXXFLAGS -Wall -fno-exceptions -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=3" dnl ---------------------------------------------- dnl For macOS