]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
compiler: -Werror=shift-count-overflow hardening
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 5 Feb 2019 22:47:31 +0000 (23:47 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 10 Apr 2019 16:46:02 +0000 (18:46 +0200)
Warn if shift count >= width of type.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
configure.ac

index 8080ea82271486b24bd6a65c66d02c70bcc8a1c7..76658af283847a9627473d8a3f340d6a902bd49a 100644 (file)
@@ -707,6 +707,7 @@ AX_CHECK_COMPILE_FLAG([-Wshadow], [CFLAGS="$CFLAGS -Wshadow"],,[-Werror])
 AX_CHECK_COMPILE_FLAG([-Wendif-labels], [CFLAGS="$CFLAGS -Wendif-labels"],,[-Werror])
 AX_CHECK_COMPILE_FLAG([-Werror=overflow], [CFLAGS="$CFLAGS -Werror=overflow"],,[-Werror])
 AX_CHECK_COMPILE_FLAG([-fdiagnostics-show-option], [CFLAGS="$CFLAGS -fdiagnostics-show-option"],,[-Werror])
+AX_CHECK_COMPILE_FLAG([-Werror=shift-count-overflow], [CFLAGS="$CFLAGS -Werror=shift-count-overflow"],,[-Werror])
 
 AX_CHECK_LINK_FLAG([-z relro], [LDLAGS="$LDLAGS -z relro"],,[])
 AX_CHECK_LINK_FLAG([-z now], [LDLAGS="$LDLAGS -z now"],,[])