From d604f4e7f91f938fbb6dc0835657bc05972e9acb Mon Sep 17 00:00:00 2001 From: Christopher Scherb Date: Fri, 2 Apr 2021 15:18:11 +0200 Subject: [PATCH] Update CMakeLists.txt The flag to disable the Canary is named wrong when adding to NO_MITS_FLAGS in CMakeLists.txt. It is defined as DISABLE_CANARY_FLAG but added as DISABLE_CANARIES_FLAG. This leads to all binaries build with NO_MITS_FLAGS still having a Canary. This pull requests fixes the issue by changing the flag name consistendly to DISABLE_CANARY_FLAG, in the definition as well as when it is added to NO_MITS_FLAGS. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fdadb7..56fa27b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ set(MBE_FLAGS "-m32 -O0 -fno-inline-functions") set(DISABLE_DEP_FLAG "-z execstack") set(DISABLE_RELRO_FLAG "-z norelro") set(DISABLE_CANARY_FLAG "-fno-stack-protector") -set(NO_MITS_FLAGS "${DISABLE_DEP_FLAG} ${DISABLE_RELRO_FLAG} ${DISABLE_CANARIES_FLAG}") +set(NO_MITS_FLAGS "${DISABLE_DEP_FLAG} ${DISABLE_RELRO_FLAG} ${DISABLE_CANARY_FLAG}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MBE_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MBE_FLAGS}")