Skip to content

Commit

Permalink
Fix potential crash bug in mxmldoc (Issue #235, Issue #236)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Dec 3, 2018
1 parent 01e2e50 commit 1afcfdb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changes in Mini-XML CURRENT

- Fixed a potential crash bug in mxmldoc found by fuzzing (Issue #235,
Issue #236)
- The `mxmldoc` program now sets the EPUB subject ("Programming").


Expand Down
2 changes: 1 addition & 1 deletion doc/mxml.man
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH mxml 3 "Mini-XML API" "10/02/18" "Mini-XML API"
.TH mxml 3 "Mini-XML API" "12/01/18" "Mini-XML API"
.SH NAME
mxml \- Mini-XML API
.SH INCLUDE FILE
Expand Down
2 changes: 1 addition & 1 deletion mxmldoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3792,7 +3792,7 @@ write_element(FILE *out, /* I - Output file */
write_string(out, node->value.text.string, mode);
}

if (!strcmp(element->value.element.name, "type") &&
if (!strcmp(element->value.element.name, "type") && element->last_child &&
element->last_child->value.text.string[0] != '*')
putc(' ', out);
}
Expand Down

0 comments on commit 1afcfdb

Please sign in to comment.