代码拉取完成,页面将自动刷新
同步操作将从 OpenHarmony/third_party_libxml2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 5b2d07a72670513e41b481a9d922c983a64027ca Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Sat, 20 Aug 2022 17:00:50 +0200
Subject: [PATCH] Use xmlStrlen in *CtxtReadDoc
xmlStrlen handles buffers larger than INT_MAX more gracefully.
Reference:https://github.com/GNOME/libxml2/commit/5b2d07a72670513e41b481a9d922c983a64027ca
Conflict:NA
---
HTMLparser.c | 7 ++-----
parser.c | 6 ++----
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/HTMLparser.c b/HTMLparser.c
index a4168f3..e0b32fe 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -7087,13 +7087,10 @@ htmlDocPtr
htmlCtxtReadDoc(htmlParserCtxtPtr ctxt, const xmlChar * cur,
const char *URL, const char *encoding, int options)
{
- const char *buf;
-
if (cur == NULL)
return (NULL);
- buf = (const char *) cur;
- return (htmlCtxtReadMemory(ctxt, buf, strlen(buf), URL, encoding,
- options));
+ return (htmlCtxtReadMemory(ctxt, (const char *) cur, xmlStrlen(cur), URL,
+ encoding, options));
}
/**
diff --git a/parser.c b/parser.c
index fbeb7af..23b031d 100644
--- a/parser.c
+++ b/parser.c
@@ -15374,12 +15374,10 @@ xmlDocPtr
xmlCtxtReadDoc(xmlParserCtxtPtr ctxt, const xmlChar * cur,
const char *URL, const char *encoding, int options)
{
- const char *buf;
-
if (cur == NULL)
return (NULL);
- buf = (const char *) cur;
- return (xmlCtxtReadMemory(ctxt, buf, strlen(buf), URL, encoding, options));
+ return (xmlCtxtReadMemory(ctxt, (const char *) cur, xmlStrlen(cur), URL,
+ encoding, options));
}
/**
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。