From 41afa89fc94a6b1cef0d0cb19263875ecf08adb6 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Sun, 10 Apr 2022 14:09:29 +0200 Subject: Fix short-lived regression in xmlStaticCopyNode Commit 7618a3b1 didn't account for coalesced text nodes. I think it would be better if xmlStaticCopyNode didn't try to coalesce text nodes at all. This code path can only be triggered if some other code doesn't coalesce text nodes properly. In this case, OSS-Fuzz found such behavior in xinclude.c. --- test/XInclude/docs/coalesce.xml | 4 ++++ test/XInclude/ents/coalesce1.xml | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 test/XInclude/docs/coalesce.xml create mode 100644 test/XInclude/ents/coalesce1.xml (limited to 'test') diff --git a/test/XInclude/docs/coalesce.xml b/test/XInclude/docs/coalesce.xml new file mode 100644 index 00000000..33d5cb64 --- /dev/null +++ b/test/XInclude/docs/coalesce.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/XInclude/ents/coalesce1.xml b/test/XInclude/ents/coalesce1.xml new file mode 100644 index 00000000..bba7b696 --- /dev/null +++ b/test/XInclude/ents/coalesce1.xml @@ -0,0 +1,5 @@ + + start + + end + -- cgit v1.2.1