summaryrefslogtreecommitdiff
path: root/expat/CMakeLists.txt
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2021-05-11 14:53:22 +0200
committerGitHub <noreply@github.com>2021-05-11 14:53:22 +0200
commit309cd4aa4b470a3e496a5d72014148dd8a583529 (patch)
treee6f79b145d532483d162ce9931fdfbf7e54be43f /expat/CMakeLists.txt
parentfb78bfdae55408af50eb0da558f288775fd92baf (diff)
parent3f2f8786623cc3e89a1f4384715b3ad178c5ee2c (diff)
downloadlibexpat-git-309cd4aa4b470a3e496a5d72014148dd8a583529.tar.gz
Merge pull request #466 from libexpat/protect-against-billion-laughs-attacks
[CVE-2013-0340, CWE-776] Protect against billion laughs attacks (fixes #34)
Diffstat (limited to 'expat/CMakeLists.txt')
-rw-r--r--expat/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt
index 951df0ed..96ac5daa 100644
--- a/expat/CMakeLists.txt
+++ b/expat/CMakeLists.txt
@@ -248,6 +248,10 @@ if(FLAG_VISIBILITY)
add_definitions(-DXML_ENABLE_VISIBILITY=1)
set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -fvisibility=hidden")
endif()
+if(MINGW)
+ # Without __USE_MINGW_ANSI_STDIO the compiler produces a false positive
+ set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -Wno-pedantic-ms-format")
+endif()
if (EXPAT_WARNINGS_AS_ERRORS)
if(MSVC)
add_definitions(/WX)