diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2022-04-10 14:09:29 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2022-04-10 14:17:31 +0200 |
commit | 41afa89fc94a6b1cef0d0cb19263875ecf08adb6 (patch) | |
tree | 33f9ebb2abd1efdb8d3f3677b40745a6c5c18fef /test | |
parent | a5724a3b4aba00a7ceebe8cefe3f589568cf50f2 (diff) | |
download | libxml2-41afa89fc94a6b1cef0d0cb19263875ecf08adb6.tar.gz |
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.
Diffstat (limited to 'test')
-rw-r--r-- | test/XInclude/docs/coalesce.xml | 4 | ||||
-rw-r--r-- | test/XInclude/ents/coalesce1.xml | 5 |
2 files changed, 9 insertions, 0 deletions
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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<test xmlns:xi="http://www.w3.org/2001/XInclude"> + <xi:include href="../ents/coalesce1.xml#xpointer(/t1))"/> +</test> 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 @@ +<t1 xmlns:xi="http://www.w3.org/2001/XInclude"> + start + <xi:include href="#xpointer(/t1/text()[1])"/> + end +</t1> |