void-packages/srcpkgs/raptor/patches/out-of-bounds.patch
Đoàn Trần Công Danh 103ab731ab srcpkgs/r*: convert patches to -Np1
* runit is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

16 lines
615 B
Diff

Patch from https://bugs.librdf.org/mantis/view.php?id=650
diff --git a/src/raptor_xml_writer.c b/src/raptor_xml_writer.c
index 56993dc3..163f34d5 100644
--- a/src/raptor_xml_writer.c
+++ b/src/raptor_xml_writer.c
@@ -216,6 +216,9 @@ raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer,
if(nstack && element->attributes) {
for(i = 0; i < element->attribute_count; i++) {
+ if (nspace_declarations_count > element->attribute_count)
+ goto error;
+
/* qname */
if(element->attributes[i]->nspace) {
/* Check if we need a namespace declaration attribute */