diff options
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/artanis-fix-Makefile.in.patch | 70 | ||||
-rw-r--r-- | gnu/packages/patches/raptor2-heap-overflow.patch | 51 |
2 files changed, 51 insertions, 70 deletions
diff --git a/gnu/packages/patches/artanis-fix-Makefile.in.patch b/gnu/packages/patches/artanis-fix-Makefile.in.patch deleted file mode 100644 index 7e4800d364..0000000000 --- a/gnu/packages/patches/artanis-fix-Makefile.in.patch +++ /dev/null @@ -1,70 +0,0 @@ -Applies until an Artanis release comes with the following patches -applied: -* <https://savannah.gnu.org/patch/?func=detailitem&item_id=9130> -* <https://savannah.gnu.org/patch/?func=detailitem&item_id=9131> -diff -ru artanis-0.1.2/Makefile.in artanis-0.1.2.1/Makefile.in ---- artanis-0.1.2/Makefile.in 2016-02-10 12:35:18.800490571 -0200 -+++ artanis-0.1.2.1/Makefile.in 2016-10-15 19:44:35.140907367 -0300 -@@ -19,9 +19,18 @@ - MOD_OBJ := $(OBJ)/artanis - BIN := bin - TEMP_LIB_PATH := $(OBJ) --MOD_PATH := $(shell guile -c "(display (%site-dir))") - MOD_COMPILED_PATH := $(shell guile -c "(display (%site-ccache-dir))") -+ -+ifdef DESTDIR -+INFO_DIR := $(DESTDIR)/share/info/ -+MOD_PATH := $(DESTDIR)/$(shell guile -c "(display (%site-dir))") - MOD_TARGET_PATH := $(DESTDIR)/$(MOD_COMPILED_PATH) -+else -+INFO_DIR := $(PREFIX)/share/info/ -+MOD_PATH := $(shell guile -c "(display (%site-dir))") -+MOD_TARGET_PATH := $(MOD_COMPILED_PATH) -+endif -+ - GUILE_CFLAGS := -Wunsupported-warning -Wunbound-variable -Warity-mismatch -Wduplicate-case-datum -Wbad-case-datum -Wformat - GUILEC := GUILE_LOAD_COMPILED_PATH=$(TEMP_LIB_PATH) guild compile $(GUILE_CFLAGS) - ARTANIS_ETC := $(SRC)/etc/artanis -@@ -36,7 +45,6 @@ - GENDOCS :=$(BUILD_AUX)/gendocs.sh - CHK_TEXINFO := $(BUILD_AUX)/check_texinfo.scm - CP := cp -frd -P --INFO_DIR := $(PREFIX)/share/info/ - TARBALL_NAME := artanis-$(VERSION) - TMP_DIR := $(shell mktemp -d) - ANN_GEN := $(BUILD_AUX)/announce-gen -@@ -124,18 +132,29 @@ - -rm -f config.{h,log} - - install: $(ALL_TARGETS) -- mkdir -p $(DESTDIR)/$(MOD_PATH) -- $(CP) $(MOD) $(DESTDIR)/$(MOD_PATH)/ -+ mkdir -p $(MOD_PATH) -+ $(CP) $(MOD) $(MOD_PATH)/ - mkdir -p $(MOD_TARGET_PATH)/ - $(CP) $(MOD_OBJ) $(MOD_TARGET_PATH)/ -+ -+ifdef DESTDIR - $(CP) $(ARTANIS_ETC) $(DESTDIR)/etc/ - $(CP) $(ARTANIS_PAGES) $(DESTDIR)/etc/artanis/ -- mkdir -p $(DESTDIR)/$(PREFIX)/bin/ -- $(CP) $(BIN)/art $(DESTDIR)/$(PREFIX)/bin/ -+ mkdir -p $(DESTDIR)/bin/ -+ $(CP) $(BIN)/art $(DESTDIR)/bin/ - mkdir -p $(DESTDIR)/etc/bash_completion.d/ - $(CP) $(CMDCOMP) $(DESTDIR)/etc/bash_completion.d/ -+else -+ $(CP) $(ARTANIS_ETC) $(PREFIX)/etc/ -+ $(CP) $(ARTANIS_PAGES) $(PREFIX)/etc/artanis/ -+ mkdir -p $(PREFIX)/bin/ -+ $(CP) $(BIN)/art $(PREFIX)/bin/ -+ mkdir -p $(PREFIX)/etc/bash_completion.d/ -+ $(CP) $(CMDCOMP) $(PREFIX)/etc/bash_completion.d/ -+endif -+ - if [ -e /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi -- if [ -e artanis.info ]; then mkdir -p $(DESTDIR)/$(INFO_DIR); $(CP) artanis.info $(DESTDIR)/$(INFO_DIR)/; fi -+ if [ -e artanis.info ]; then mkdir -p $(INFO_DIR); $(CP) artanis.info $(INFO_DIR)/; fi - - distclean: distclean-mk clean clean-config clean-tarball - -rm -f $(BIN)/art diff --git a/gnu/packages/patches/raptor2-heap-overflow.patch b/gnu/packages/patches/raptor2-heap-overflow.patch new file mode 100644 index 0000000000..ce2a4516f8 --- /dev/null +++ b/gnu/packages/patches/raptor2-heap-overflow.patch @@ -0,0 +1,51 @@ +This patch addresses two heap overflow bugs in raptor2: + +http://seclists.org/oss-sec/2017/q2/424 + +Patch copied from libreoffice: + +https://github.com/LibreOffice/core/blob/master/external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1 + +From 590681e546cd9aa18d57dc2ea1858cb734a3863f Mon Sep 17 00:00:00 2001 +From: Dave Beckett <dave@dajobe.org> +Date: Sun, 16 Apr 2017 23:15:12 +0100 +Subject: [PATCH] Calcualte max nspace declarations correctly for XML writer + +(raptor_xml_writer_start_element_common): Calculate max including for +each attribute a potential name and value. + +Fixes Issues #0000617 http://bugs.librdf.org/mantis/view.php?id=617 +and #0000618 http://bugs.librdf.org/mantis/view.php?id=618 +--- + src/raptor_xml_writer.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/raptor_xml_writer.c b/src/raptor_xml_writer.c +index 693b946..0d3a36a 100644 +--- a/src/raptor_xml_writer.c ++++ b/src/raptor_xml_writer.c +@@ -181,9 +181,10 @@ raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer, + size_t nspace_declarations_count = 0; + unsigned int i; + +- /* max is 1 per element and 1 for each attribute + size of declared */ + if(nstack) { +- int nspace_max_count = element->attribute_count+1; ++ int nspace_max_count = element->attribute_count * 2; /* attr and value */ ++ if(element->name->nspace) ++ nspace_max_count++; + if(element->declared_nspaces) + nspace_max_count += raptor_sequence_size(element->declared_nspaces); + if(element->xml_language) +@@ -237,7 +238,7 @@ raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer, + } + } + +- /* Add the attribute + value */ ++ /* Add the attribute's value */ + nspace_declarations[nspace_declarations_count].declaration= + raptor_qname_format_as_xml(element->attributes[i], + &nspace_declarations[nspace_declarations_count].length); +-- +2.9.3 + |