summarylogtreecommitdiffstats
path: root/raptor-2.0.15-out_of_bounds.patch
blob: 04106dc9a70e13e11bf2871043a8a065e4abb47d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 */