代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/xmlrpc-c 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 5c1a31642e243f4870c0bd1f2afc7597976521bf Mon Sep 17 00:00:00 2001
From: Sebastian Pipping <sebastian@pipping.org>
Date: Mon, 19 Aug 2024 22:26:07 +0200
Subject: [PATCH] lib: Reject negative len for XML_ParseBuffer
Reported by TaiYou
Conflict:file path adapt
add error code XML_ERROR_INVALID_ARGUMENT
parser->m_errorCode => errorCode
return XML_STATUS_ERROR => return 0
context adapt
Reference:https://github.com/libexpat/libexpat/commit/5c1a31642e243f4870c0bd1f2afc7597976521bf
---
lib/expat/xmlparse/xmlparse.c | 8 +++++++-
lib/expat/xmlparse/xmlparse.h | 3 ++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/lib/expat/xmlparse/xmlparse.c b/lib/expat/xmlparse/xmlparse.c
index 8087360..d2363da 100644
--- a/lib/expat/xmlparse/xmlparse.c
+++ b/lib/expat/xmlparse/xmlparse.c
@@ -4810,6 +4810,11 @@ xmlrpc_XML_ParseBuffer(XML_Parser const xmlParserP,
return 0;
}
+ if (len < 0) {
+ errorCode = XML_ERROR_INVALID_ARGUMENT;
+ return 0;
+ }
+
parser->m_positionPtr = start;
parser->m_bufferEnd += len;
parser->m_parseEndByteIndex += len;
@@ -5017,7 +5022,8 @@ xmlrpc_XML_ErrorString(int const code) {
/* UNCLOSED_CDATA_SECTION */ XML_T("unclosed CDATA section"),
/* EXTERNAL_ENTITY_HANDLING */
XML_T("error in processing external entity reference"),
- /* NOT_STANDALONE */ XML_T("document is not standalone")
+ /* NOT_STANDALONE */ XML_T("document is not standalone"),
+ /* INVALID_ARGUMENT */ XML_T("invalid argument")
};
const XML_LChar * retval;
diff --git a/lib/expat/xmlparse/xmlparse.h b/lib/expat/xmlparse/xmlparse.h
index 76cf0db..63133ba 100644
--- a/lib/expat/xmlparse/xmlparse.h
+++ b/lib/expat/xmlparse/xmlparse.h
@@ -518,7 +518,8 @@ enum XML_Error {
XML_ERROR_INCORRECT_ENCODING,
XML_ERROR_UNCLOSED_CDATA_SECTION,
XML_ERROR_EXTERNAL_ENTITY_HANDLING,
- XML_ERROR_NOT_STANDALONE
+ XML_ERROR_NOT_STANDALONE,
+ XML_ERROR_INVALID_ARGUMENT
};
/* If xmlrpc_XML_Parse or xmlrpc_XML_ParseBuffer have returned 0, then
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。