Fix crash bug in mxmlWrite functions (Issue #228)

This commit is contained in:
Michael R Sweet 2018-09-29 20:31:10 -04:00
parent 501dcfe6b6
commit d32a541211
No known key found for this signature in database
GPG Key ID: 999559A027815955
3 changed files with 5 additions and 4 deletions

View File

@ -8,7 +8,8 @@
- The `mxmlNewCDATA` and `mxmlSetCDATA` functions incorrectly added the XML
trailer "]]" to the string (Issue #216)
- Cross-compiling failed on install (Issue #218)
- Updated the ZIP container library used for mxmldoc.
- Fixed a crash bug in the `mxmlWrite` functions (Issue #228)
- Updated the markdown and ZIP container libraries used for mxmldoc.
# Changes in Mini-XML 2.11

View File

@ -1,7 +1,7 @@
/*
* File loading code for Mini-XML, a small XML file parsing library.
*
* Copyright 2003-2017 by Michael R Sweet.
* Copyright 2003-2018 by Michael R Sweet.
*
* These coded instructions, statements, and computer programs are the
* property of Michael R Sweet and are protected by Federal copyright
@ -2974,7 +2974,7 @@ mxml_write_node(mxml_node_t *node, /* I - Node to write */
{
while ((next = current->next) == NULL)
{
if (current == node)
if (current == node || !current->parent)
break;
/*

View File

@ -3,7 +3,7 @@
* Documentation generator using Mini-XML, a small XML file parsing
* library.
*
* Copyright 2003-2017 by Michael R Sweet.
* Copyright 2003-2018 by Michael R Sweet.
*
* These coded instructions, statements, and computer programs are the
* property of Michael R Sweet and are protected by Federal copyright