!184 [sync] PR-180: revert parser-Fix-progress-check
From: @openeuler-sync-bot Reviewed-by: @hubin95 Signed-off-by: @hubin95
This commit is contained in:
commit
761cc73061
@ -1,43 +0,0 @@
|
|||||||
From 11f49efda51bfde64d341d7a475d480adfeeac79 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
|
||||||
Date: Mon, 21 Nov 2022 21:35:01 +0100
|
|
||||||
Subject: [PATCH 22/28] parser: Fix progress check when parsing character data
|
|
||||||
|
|
||||||
Skip over zero bytes to guarantee progress. Short-lived regression.
|
|
||||||
|
|
||||||
Reference: https://github.com/GNOME/libxml2/commit/a8b31e68c2331a1289e860ce07c8b80b855b7bf4
|
|
||||||
Conflict: parser.c:<xmlParseCharDataComplex>
|
|
||||||
---
|
|
||||||
parser.c | 2 +-
|
|
||||||
parserInternals.c | 2 +-
|
|
||||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/parser.c b/parser.c
|
|
||||||
index 4615db0..6e55838 100644
|
|
||||||
--- a/parser.c
|
|
||||||
+++ b/parser.c
|
|
||||||
@@ -4654,7 +4654,7 @@ xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- if ((cur != 0) && (!IS_CHAR(cur))) {
|
|
||||||
+ if ((ctxt->input->cur < ctxt->input->end) && (!IS_CHAR(cur))) {
|
|
||||||
/* Generate the error and skip the offending character */
|
|
||||||
xmlFatalErrMsgInt(ctxt, XML_ERR_INVALID_CHAR,
|
|
||||||
"PCDATA invalid Char value %d\n",
|
|
||||||
diff --git a/parserInternals.c b/parserInternals.c
|
|
||||||
index 422dfc0..b8eab4b 100644
|
|
||||||
--- a/parserInternals.c
|
|
||||||
+++ b/parserInternals.c
|
|
||||||
@@ -406,7 +406,7 @@ xmlNextChar(xmlParserCtxtPtr ctxt)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if ((*ctxt->input->cur == 0) &&
|
|
||||||
+ if ((ctxt->input->cur >= ctxt->input->end) &&
|
|
||||||
(xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
||||||
10
libxml2.spec
10
libxml2.spec
@ -1,7 +1,7 @@
|
|||||||
Summary: Library providing XML and HTML support
|
Summary: Library providing XML and HTML support
|
||||||
Name: libxml2
|
Name: libxml2
|
||||||
Version: 2.9.14
|
Version: 2.9.14
|
||||||
Release: 6
|
Release: 7
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Source: https://download.gnome.org/sources/%{name}/2.9/%{name}-%{version}.tar.xz
|
Source: https://download.gnome.org/sources/%{name}/2.9/%{name}-%{version}.tar.xz
|
||||||
@ -61,7 +61,7 @@ Patch6042: backport-uri-Allow-port-without-host.patch
|
|||||||
Patch6043: backport-parser-Fix-consumed-accounting-when-switching-encodi.patch
|
Patch6043: backport-parser-Fix-consumed-accounting-when-switching-encodi.patch
|
||||||
Patch6044: backport-html-Fix-check-for-end-of-comment-in-push-parser.patch
|
Patch6044: backport-html-Fix-check-for-end-of-comment-in-push-parser.patch
|
||||||
Patch6045: backport-parser-Fix-push-parser-with-1-3-byte-initial-chunk.patch
|
Patch6045: backport-parser-Fix-push-parser-with-1-3-byte-initial-chunk.patch
|
||||||
Patch6046: backport-parser-Fix-progress-check-when-parsing-character-dat.patch
|
|
||||||
Patch6047: backport-parser-Restore-parser-state-in-xmlParseCDSect.patch
|
Patch6047: backport-parser-Restore-parser-state-in-xmlParseCDSect.patch
|
||||||
Patch6048: backport-parser-Remove-dangerous-check-in-xmlParseCharData.patch
|
Patch6048: backport-parser-Remove-dangerous-check-in-xmlParseCharData.patch
|
||||||
Patch6049: backport-parser-Don-t-call-DefaultSAXHandlerInit-from-xmlInit.patch
|
Patch6049: backport-parser-Don-t-call-DefaultSAXHandlerInit-from-xmlInit.patch
|
||||||
@ -342,6 +342,12 @@ rm -fr %{buildroot}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jun 19 2023 zhuofeng <zhuofeng2@huawei.com> - 2.9.14-7
|
||||||
|
- Type:bugfix
|
||||||
|
- CVE:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:revert parser-Fix-progress-check
|
||||||
|
|
||||||
* Thu Jun 08 2023 zhuofeng <zhuofeng2@huawei.com> - 2.9.14-6
|
* Thu Jun 08 2023 zhuofeng <zhuofeng2@huawei.com> - 2.9.14-6
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- CVE:NA
|
- CVE:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user