Blame SOURCES/0068-xmpsdk-Build-with-DBanAllEntityUsage-1.patch

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