summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-09 11:56:39 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-09 11:57:14 +0100
commitb1620451b7d6f2230f71c7c2f1896525b85a3dd0 (patch)
tree263c031c4d022b9b63aeae532720f37c66765a97
parent44eedb0487bd88aa56d99234657cba153bb06631 (diff)
external/redland: Work around -fsanitize=nonnull-attribute
Change-Id: Ibffc44da6e9d6fb02d43d8a2b7e143ff994d76a8
-rw-r--r--external/redland/UnpackedTarball_raptor.mk3
-rw-r--r--external/redland/raptor/ubsan.patch14
2 files changed, 17 insertions, 0 deletions
diff --git a/external/redland/UnpackedTarball_raptor.mk b/external/redland/UnpackedTarball_raptor.mk
index 90a179983959..f1949d14cea7 100644
--- a/external/redland/UnpackedTarball_raptor.mk
+++ b/external/redland/UnpackedTarball_raptor.mk
@@ -15,11 +15,14 @@ $(eval $(call gb_UnpackedTarball_set_tarball,raptor,$(RAPTOR_TARBALL),,redland))
$(eval $(call gb_UnpackedTarball_add_file,raptor,src/raptor2.h,external/redland/raptor/raptor2.h))
$(eval $(call gb_UnpackedTarball_add_file,raptor,src/raptor_config.h,external/redland/raptor/raptor_config.h))
+$(eval $(call gb_UnpackedTarball_set_patchlevel,raptor,0))
+
$(eval $(call gb_UnpackedTarball_add_patches,raptor,\
external/redland/raptor/raptor-freebsd.patch.1 \
$(if $(filter WNTGCC,$(OS)$(COM)),external/redland/raptor/raptor-mingw.patch.1) \
$(if $(filter-out WNT,$(OS)),external/redland/raptor/raptor-bundled-soname.patch.1) \
$(if $(filter ANDROID,$(OS)),external/redland/raptor/raptor-android.patch.1) \
+ external/redland/raptor/ubsan.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/redland/raptor/ubsan.patch b/external/redland/raptor/ubsan.patch
new file mode 100644
index 000000000000..4be6e6a0e6b0
--- /dev/null
+++ b/external/redland/raptor/ubsan.patch
@@ -0,0 +1,14 @@
+--- src/raptor_uri.c
++++ src/raptor_uri.c
+@@ -1336,9 +1336,9 @@
+ !strncmp((const char*)base_detail->scheme,
+ (const char*)reference_detail->scheme,
+ base_detail->scheme_len) &&
+- !strncmp((const char*)base_detail->authority,
++ (base_detail->authority_len == 0 || !strncmp((const char*)base_detail->authority,
+ (const char*)reference_detail->authority,
+- base_detail->authority_len)) {
++ base_detail->authority_len))) {
+
+ if(!base_detail->path) {
+ if(reference_detail->path) {