| OLD | NEW |
| (Empty) | |
| 1 observed while fuzzing |
| 2 |
| 3 --- src/valid.c |
| 4 +++ src/valid.c |
| 5 @@ -1172,12 +1172,14 @@ xmlDumpElementContent(xmlBufferPtr buf, xmlElementConten
tPtr content, int glob) |
| 6 xmlBufferWriteCHAR(buf, content->name); |
| 7 break; |
| 8 case XML_ELEMENT_CONTENT_SEQ: |
| 9 + if (content->c1 == NULL) return; |
| 10 if ((content->c1->type == XML_ELEMENT_CONTENT_OR) || |
| 11 (content->c1->type == XML_ELEMENT_CONTENT_SEQ)) |
| 12 xmlDumpElementContent(buf, content->c1, 1); |
| 13 else |
| 14 xmlDumpElementContent(buf, content->c1, 0); |
| 15 xmlBufferWriteChar(buf, " , "); |
| 16 + if (content->c2 == NULL) return; |
| 17 if ((content->c2->type == XML_ELEMENT_CONTENT_OR) || |
| 18 ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) && |
| 19 (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE))) |
| 20 @@ -1186,12 +1188,14 @@ xmlDumpElementContent(xmlBufferPtr buf, xmlElementConten
tPtr content, int glob) |
| 21 xmlDumpElementContent(buf, content->c2, 0); |
| 22 break; |
| 23 case XML_ELEMENT_CONTENT_OR: |
| 24 + if (content->c1 == NULL) return; |
| 25 if ((content->c1->type == XML_ELEMENT_CONTENT_OR) || |
| 26 (content->c1->type == XML_ELEMENT_CONTENT_SEQ)) |
| 27 xmlDumpElementContent(buf, content->c1, 1); |
| 28 else |
| 29 xmlDumpElementContent(buf, content->c1, 0); |
| 30 xmlBufferWriteChar(buf, " | "); |
| 31 + if (content->c2 == NULL) return; |
| 32 if ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) || |
| 33 ((content->c2->type == XML_ELEMENT_CONTENT_OR) && |
| 34 (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE))) |
| OLD | NEW |