|
322e733b
|
2024-07-18T19:27:43
|
|
xinclude: Fix fallback for text includes
Fixes #772.
|
|
1dd5e76a
|
2024-06-17T21:06:46
|
|
xinclude: Don't remove root element
Don't replace include element at root with empty nodeset.
|
|
52ce0d70
|
2024-06-17T17:35:12
|
|
tests: Add XInclude test for issue #733
|
|
6e3a2ac6
|
2023-12-22T21:38:50
|
|
xinclude: Rework xml:base fixup
The xml:base fixup was broken in more complex cases.
Also avoid parsing and building the included URI multiple times.
|
|
e20f4d7a
|
2023-02-13T14:38:05
|
|
xinclude: Fix quadratic behavior in xmlXIncludeLoadTxt
Also make text inclusions work with memory buffers, for example when
using a custom entity loader, and fix a memory leak in case of invalid
characters.
Fixes #483.
|
|
b456e3bb
|
2022-10-30T20:28:20
|
|
xinclude: Always allow XPtr expressions in external documents
|
|
eef0a739
|
2022-10-30T12:21:20
|
|
xinclude: Implement "streaming" mode
When using xmlreader, XPointer expressions in XIncludes simply cannot
work. Expressions can reference nodes which weren't parsed yet or which
were already deleted.
After fixing nested XIncludes, we reference includes which were parsed
previously. When streaming, these nodes could have been deleted, leading
to use-after-free errors.
Disallow XPointer expressions and truncate the include table in
streaming mode.
|
|
20e2fb4c
|
2022-10-23T17:52:29
|
|
xinclude: Avoid creation of subcontexts
Don't create subcontext in xmlXIncludeRecurseDoc. Save and restore 'doc'
and 'incTab' instead.
Make xmlXIncludeLoadFallback call xmlXIncludeCopyNode which seems safer
than xmlXIncludeDoProcess since the latter may modify the document.
This should also be more performant since we need to copy the whole
fallback subtree anyway. Also make sure to avoid replacements in
fallback elements in xmlXIncludeDoProcess.
|
|
d2ed1e4f
|
2022-10-22T16:50:18
|
|
xinclude: Limit recursion depth
This avoids call stack overflows.
|
|
34496f26
|
2022-10-22T16:09:21
|
|
xinclude: Test for inclusion loops
|
|
bc267cb9
|
2022-10-22T02:19:22
|
|
xinclude: Expand includes in xmlXIncludeCopyNode
This should make nested includes work reliably.
Fixes #424.
|
|
c99cde3f
|
2022-10-22T16:59:35
|
|
xinclude: Also test error messages
The reader interface with XIncludes is somewhat broken and can generate
different error messages. Start to move tests which are sketchy with
reader to a separate directory.
|
|
938105b5
|
2022-10-21T15:56:12
|
|
Revert "xinclude: Fix regression with nested includes"
This reverts commit 7f04e297318b1b908cec20711f74f75625afed7f which
caused memory errors.
See #424.
|
|
7f04e297
|
2022-10-18T18:40:00
|
|
xinclude: Fix regression with nested includes
This reverts commits 74dcc10b and 87d20b55.
Fixes #424.
|
|
41afa89f
|
2022-04-10T14:09:29
|
|
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.
|
|
bc06a522
|
2022-03-02T02:57:49
|
|
Fix recursion check in xinclude.c
Compare the included URL with the document's URL to detect local
inclusions.
Fixes #348.
|
|
87d20b55
|
2020-08-19T13:52:08
|
|
Fix regression introduced with commit 74dcc10b
The code wasn't dead after all, but I can see no reason in delaying
the XPointer evaluation. This could lead to nodes included earlier
appearing in XPointer results.
|
|
d88df4bd
|
2020-08-16T23:38:48
|
|
Fix corner case with empty xi:fallback
xi:fallback could become empty after recursive expansion. Use a flag
to track whether nodes should be skipped.
|
|
1abf2967
|
2020-08-06T17:51:57
|
|
Fix exponential runtime and memory in xi:fallback processing
When creating XML_XINCLUDE_START nodes, the children of the original
xi:include node must be freed, otherwise fallback content is copied
twice, doubling runtime and memory consumption for each nested
xi:fallback/xi:include pair.
Found with libFuzzer.
|
|
0f9817c7
|
2020-06-10T16:34:52
|
|
Don't recurse into xi:include children in xmlXIncludeDoProcess
Otherwise, nested xi:include nodes might result in a use-after-free
if XML_PARSE_NOXINCNODE is specified.
Found with libFuzzer and ASan.
|
|
2a350ee9
|
2019-09-30T17:04:54
|
|
Large batch of typo fixes
Closes #109.
|
|
5d8d10bb
|
2004-04-16T08:11:26
|
|
fixed problem causing duplicate fallback execution (bug 139520) added
* xinclude.c: fixed problem causing duplicate fallback
execution (bug 139520)
* test/XInclude/docs/fallback2.xml result/XInclude/fallback2.*:
added testcase
|
|
e74d2e1c
|
2003-12-09T11:35:37
|
|
augmented the XInclude API to be able to pass XML parser flags down to the
* xinclude.c xmllint.c xmlreader.c include/libxml/xinclude.h
include/libxml/xmlerror.h: augmented the XInclude API
to be able to pass XML parser flags down to the Inclusion
process. Also resynchronized with the Last Call W3C Working
Draft 10 November 2003 for the xpointer attribute.
* Makefile.am test/XInclude/docs/nodes[23].xml
result/XInclude/*: augmented the tests for the new namespace and
testing the xpointer attribute, changed the way error messages
are tested
* doc/*: regenerated the documentation
Daniel
|
|
d076a20e
|
2002-11-20T13:28:31
|
|
fixed #99082 for xi:include encoding="..." support on text includes. added
* xinclude.c parserInternals.c encoding.c: fixed #99082
for xi:include encoding="..." support on text includes.
* result/XInclude/tstencoding.xml test/XInclude/docs/tstencoding.xml
test/XInclude/ents/isolatin.txt : added a specific regression test
* python/generator.py python/libxml2class.txt: fixed the generator
the new set of comments generated for doc/libxml2-api.xml were
breaking the python generation.
Daniel
|
|
e3b7d9a1
|
2002-08-14T14:11:30
|
|
quick but apparently working implementation of xi:fallback, should close
* xinclude.c: quick but apparently working implementation of
xi:fallback, should close bug #89684
* Makefile.am test/XInclude/docs/fallback.xml
result/XInclude/fallback.xml: added a basic test for fallback,
and run with --nowarning to avoid a spurious warning
* configure.in: applied patch from Frederic Crozat for python
bindings on AMD 64bits machines.
Daniel
|
|
c5f05ada
|
2002-02-10T11:57:22
|
|
fix #68882, cleanup the XInclude copying of node, merge back IDs in the
* tree.c valid.c xinclude.c: fix #68882, cleanup the XInclude
copying of node, merge back IDs in the target document.
* result/XInclude/docids.xml test/XInclude/docs/docids.xml
test/XInclude/ents/ids.xml: test case
* result/VC/ElementValid4: output changed due to a typo fix
Daniel
|
|
d16df9f6
|
2001-05-23T13:44:21
|
|
- xinclude.c: fixed XInclude recursive behaviour bug #54678
- result/XInclude/recursive.xml test/XInclude/docs/recursive.xml
test/XInclude/ents/inc.txt test/XInclude/ents/sub-inc.ent:
added specific regression test
- parser.h: preparing for the XSLT mode where DTD inherited
attributes are added to the tree.
Daniel
|
|
bbd22458
|
2001-05-23T12:02:27
|
|
- xinclude.[ch]: Updated the namespace for the Last Call version
- result/XInclude/include test/XInclude/include: updated the
testsuite accordingly
Daniel
|
|
bf43275d
|
2000-11-12T15:56:56
|
|
Bug fixes new Xinclude tests:
- nanoftp.c: fixed gcc 2.95 new warnings
- SAX.c: fixed a stupid bug
- tree.c: fixed a formatting problem when round-tripping
from/to memory
- xinclude.c: chased memleak, fixed a base problem
- xpointer.c: added xmlXPtrBuildRangeNodeList(), finished ?
xmlXPtrBuildNodeList()
- TODO: updated
- Makefile.am test/XInclude/docs test/XInclude/ents result/XInclude:
adding a first small set of regression tests for XInclude
Daniel
|