[LIBXML2] Update to version 2.9.13. CORE-17766

This commit is contained in:
Thomas Faber 2022-11-19 15:10:13 -05:00
parent df1adce32c
commit 7244e0c5c6
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
35 changed files with 1127 additions and 20110 deletions

View file

@ -2739,6 +2739,8 @@ __xmlOutputBufferCreateFilename(const char *URI,
ret->writecallback = xmlGzfileWrite;
ret->closecallback = xmlGzfileClose;
}
else
xmlGzfileClose(context);
return(ret);
}
}
@ -3405,12 +3407,18 @@ xmlOutputBufferWrite(xmlOutputBufferPtr out, int len, const char *buf) {
out->error = XML_IO_ENCODER;
return(-1);
}
nbchars = ret >= 0 ? ret : 0;
if (out->writecallback)
nbchars = xmlBufUse(out->conv);
else
nbchars = ret >= 0 ? ret : 0;
} else {
ret = xmlBufAdd(out->buffer, (const xmlChar *) buf, chunk);
if (ret != 0)
return(-1);
nbchars = chunk;
if (out->writecallback)
nbchars = xmlBufUse(out->buffer);
else
nbchars = chunk;
}
buf += chunk;
len -= chunk;
@ -3597,13 +3605,19 @@ xmlOutputBufferWriteEscape(xmlOutputBufferPtr out, const xmlChar *str,
out->error = XML_IO_ENCODER;
return(-1);
}
nbchars = ret >= 0 ? ret : 0;
if (out->writecallback)
nbchars = xmlBufUse(out->conv);
else
nbchars = ret >= 0 ? ret : 0;
} else {
ret = escaping(xmlBufEnd(out->buffer), &chunk, str, &cons);
if ((ret < 0) || (chunk == 0)) /* chunk==0 => nothing done */
return(-1);
xmlBufAddLen(out->buffer, chunk);
nbchars = chunk;
if (out->writecallback)
nbchars = xmlBufUse(out->buffer);
else
nbchars = chunk;
}
str += cons;
len -= cons;