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

buf: Fix xmlBufBackToBuffer

Short-lived regression.
This commit is contained in:
Nick Wellnhofer 2024-07-18 02:10:32 +02:00
parent 5862e9dd37
commit 2440cb5dd5

4
buf.c
View File

@ -635,12 +635,10 @@ int
xmlBufBackToBuffer(xmlBufPtr buf, xmlBufferPtr ret) {
if (ret == NULL)
return(-1);
CHECK_COMPAT(buf)
if ((buf == NULL) || (BUF_ERROR(buf)) || (BUF_STATIC(buf)) ||
(buf->use >= INT_MAX)) {
if (!BUF_STATIC(buf))
xmlBufFree(buf);
xmlBufFree(buf);
ret->content = NULL;
ret->contentIO = NULL;
ret->use = 0;