The `mxmlSetOpaquef` and `mxmlSetTextf` functions did not work (Issue #244)

Use _mxml_vstrdupf function, not _mxml_strdupf.
pull/262/head
Michael R Sweet 5 years ago
parent 2767bf73b1
commit 1b8f4a2091
No known key found for this signature in database
GPG Key ID: 999559A027815955
  1. 1
      CHANGES.md
  2. 4
      mxml-set.c

@ -11,6 +11,7 @@
- The `mxmlSetCDATA`, `mxmlSetElement`, `mxmlSetOpaque`, `mxmlSetOpaquef`,
`mxmlSetText`, and `mxmlSetTextf` functions caused a use-after-free bug if
the value came from the same node (Issue #241)
- The `mxmlSetOpaquef` and `mxmlSetTextf` functions did not work (Issue #244)
# Changes in Mini-XML 2.12

@ -243,7 +243,7 @@ mxmlSetOpaquef(mxml_node_t *node, /* I - Node to set */
*/
va_start(ap, format);
s = _mxml_strdupf(format, ap);
s = _mxml_vstrdupf(format, ap);
va_end(ap);
if (node->value.opaque)
@ -360,7 +360,7 @@ mxmlSetTextf(mxml_node_t *node, /* I - Node to set */
*/
va_start(ap, format);
s = _mxml_strdupf(format, ap);
s = _mxml_vstrdupf(format, ap);
va_end(ap);
if (node->value.text.string)

Loading…
Cancel
Save