Files
third_party_libxml2/Fix-malloc-fail.patch
@ran-zhao-yu 53dd082fc4 修复漏洞malloc-fail
Signed-off-by: @ran-zhao-yu <ranzhaoyu1@huawei.com>
2024-05-24 17:32:16 +08:00

13 lines
422 B
Diff

diff --git a/buf.c b/buf.c
index 40a5ee06..1fa975a6 100644
--- a/buf.c
+++ b/buf.c
@@ -1265,7 +1265,7 @@ xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer) {
*/
int
xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input) {
- if ((input == NULL) || (buf == NULL) || (buf->error))
+ if ((input == NULL) || (buf == NULL))
return(-1);
CHECK_COMPAT(buf)
input->base = input->cur = buf->content;