Browse Source

Fix #38354 (Unwanted reformatting of XML when using AsXML)

PECL_OPENSSL
Christian Stocker 20 years ago
parent
commit
42982ac3a1
  1. 1
      NEWS
  2. 4
      ext/simplexml/simplexml.c

1
NEWS

@ -30,6 +30,7 @@ PHP NEWS
- Fixed phpinfo() cutoff of variables at \0. (Ilia)
- Fixed a bug in the filter extension that prevented magic_quotes_gpc from
being applied when RAW filter is used. (Ilia)
- Fixed bug #38354 (Unwanted reformatting of XML when using AsXML). (Christian)
- Fixed bug #38347 (Segmentation fault when using foreach with an unknown/empty
SimpleXMLElement). (Tony)
- Fixed bug #38322 (reading past array in sscanf() leads to arbitary code

4
ext/simplexml/simplexml.c

@ -1205,7 +1205,7 @@ SXE_METHOD(asXML)
RETURN_FALSE;
}
xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 1, NULL);
xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, NULL);
xmlOutputBufferClose(outbuf);
RETURN_TRUE;
}
@ -1229,7 +1229,7 @@ SXE_METHOD(asXML)
RETURN_FALSE;
}
xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 1, ((xmlDocPtr) sxe->document->ptr)->encoding);
xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, ((xmlDocPtr) sxe->document->ptr)->encoding);
xmlOutputBufferFlush(outbuf);
strval = xmlStrndup(outbuf->buffer->content, outbuf->buffer->use);
strval_len = outbuf->buffer->use;

Loading…
Cancel
Save