f68f66
From e44d1dbe769f3b60a3d671be310f4af4f9490e6b Mon Sep 17 00:00:00 2001
f68f66
From: Andreas Schneider <asn@cryptomilk.org>
f68f66
Date: Thu, 3 Jan 2019 10:31:25 +0100
f68f66
Subject: [PATCH 68/70] xmpsdk: Build with -DBanAllEntityUsage=1
f68f66
f68f66
Prevent a denial-service-attack related to XML entity expansion
f68f66
("billion laughs attack").
f68f66
See https://bugzilla.redhat.com/show_bug.cgi?id=888769
f68f66
f68f66
Search for BanAllEntityUsage in xmpsdk/src/ExpatAdapter.cpp
f68f66
f68f66
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
f68f66
---
f68f66
 xmpsdk/CMakeLists.txt | 4 ++++
f68f66
 1 file changed, 4 insertions(+)
f68f66
f68f66
diff --git a/xmpsdk/CMakeLists.txt b/xmpsdk/CMakeLists.txt
f68f66
index fa521043..ae011dc3 100644
f68f66
--- a/xmpsdk/CMakeLists.txt
f68f66
+++ b/xmpsdk/CMakeLists.txt
f68f66
@@ -38,6 +38,10 @@ target_include_directories(exiv2-xmp
f68f66
         ${EXPAT_INCLUDE_DIR}
f68f66
 )
f68f66
 
f68f66
+# Prevent a denial-service-attack related to XML entity expansion
f68f66
+# ("billion laughs attack").
f68f66
+# See https://bugzilla.redhat.com/show_bug.cgi?id=888769
f68f66
+target_compile_definitions(exiv2-xmp PRIVATE BanAllEntityUsage=1)
f68f66
 if (MSVC)
f68f66
     target_compile_definitions(exiv2-xmp PRIVATE XML_STATIC)
f68f66
 endif()
f68f66
-- 
f68f66
2.17.2
f68f66