mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-26 00:37:43 +03:00
html: Fix quadratic behavior in htmlNodeDump
Use an efficient buffer allocation scheme.
This commit is contained in:
@@ -475,6 +475,7 @@ htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) {
|
|||||||
if (buffer == NULL)
|
if (buffer == NULL)
|
||||||
return(-1);
|
return(-1);
|
||||||
|
|
||||||
|
xmlBufSetAllocationScheme(buffer, XML_BUFFER_ALLOC_DOUBLEIT);
|
||||||
ret = htmlBufNodeDumpFormat(buffer, doc, cur, 1);
|
ret = htmlBufNodeDumpFormat(buffer, doc, cur, 1);
|
||||||
|
|
||||||
xmlBufBackToBuffer(buffer);
|
xmlBufBackToBuffer(buffer);
|
||||||
|
|||||||
Reference in New Issue
Block a user