1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-27 18:50:07 +03:00

html: Fix quadratic behavior in htmlNodeDump

Use an efficient buffer allocation scheme.
This commit is contained in:
Nick Wellnhofer 2024-03-06 14:14:33 +01:00
parent b1e75a9191
commit 10c4ed1f2d

View File

@ -475,6 +475,7 @@ htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) {
if (buffer == NULL)
return(-1);
xmlBufSetAllocationScheme(buffer, XML_BUFFER_ALLOC_DOUBLEIT);
ret = htmlBufNodeDumpFormat(buffer, doc, cur, 1);
xmlBufBackToBuffer(buffer);