Omar Siam
852b070fcd
Change comment style
2025-06-10 18:47:59 +02:00
Omar Siam
bb7169b5ad
Fix relaxng is parsed to an infinite attrs->next loop
...
Test data for the bug.
2025-06-10 18:34:44 +02:00
Nick Wellnhofer
f428bdd1d9
xmllint: Make output options depend on LIBXML_OUTPUT_ENABLED
2025-06-08 17:01:11 +02:00
Nick Wellnhofer
3e47ceeb72
xmllint: Warn about options with no effect
2025-06-08 17:01:02 +02:00
Nick Wellnhofer
2ffb8c96a3
doc: Improve xmllint documentation
...
Group more options. Clarify effect of some parser options. Mention
streaming validation with `--sax`. Remove references to libxml(3).
2025-06-08 17:01:02 +02:00
Nick Wellnhofer
6b50d8c888
html: Add missing call to grow parser in htmlParseComment
...
Otherwise, long chains of short comments could exhaust the input buffer
when pull parsing.
2025-06-08 14:22:32 +02:00
Nick Wellnhofer
70335c41fc
html: Don't stop on unsupported encoding
...
Continue to parse unlike in the XML case.
2025-06-08 14:22:32 +02:00
Nick Wellnhofer
416da89d0b
html: Make htmlCtxtReset call xmlCtxtReset
...
The two implementations shouldn't diverge.
2025-06-08 14:22:32 +02:00
Nick Wellnhofer
fa81e849be
xmllint: Fix --memory --repeat
...
Always reset parser context.
Should fix #937 .
2025-06-08 14:22:32 +02:00
Nick Wellnhofer
220c813e35
globals: Fix documentation of xmlThrDef* functions
2025-06-08 14:22:32 +02:00
Nick Wellnhofer
7e08d93c94
doc: Improve documentation of tree data types
2025-06-08 14:22:32 +02:00
Nick Wellnhofer
86cf217d34
build: Disable Schematron support by default
2025-06-08 14:22:32 +02:00
Nick Wellnhofer
8da19f2320
doc: Add more warnings to xmlCleanupParser
2025-06-08 14:22:32 +02:00
Alex Richardson
7e4247b278
parser: use XML_INT_TO_PTR when storing integers as pointers
...
This fixes warnings when using a CHERI-aware toolchain.
2025-06-06 12:11:54 -07:00
Nick Wellnhofer
c6206c9387
html: Ignore ASCII-incompatible encoding in meta tag
...
After successfully parsing an ASCII-encoded meta tag, switching to an
encoding that isn't ASCII-compatible cannot work.
2025-06-05 22:24:50 +02:00
Nick Wellnhofer
2b6b3945f2
Revert "SAX1: Align handling of default attributes with SAX2"
...
This reverts commit db65b2fc51 .
This didn't check for duplicate default attributes.
2025-06-03 16:21:56 +02:00
Nick Wellnhofer
30375877d9
parser: Fix custom SAX parsers without cdataBlock handler
...
Use characters handler if cdataBlock handler is NULL.
Regressed with 57e4bbd8 . Should fix #934 .
2025-06-03 16:21:48 +02:00
Nick Wellnhofer
5e7c72cd5c
doc: Misc fixes
2025-06-03 01:27:12 +02:00
Nick Wellnhofer
5f8e537d0a
doc: Misc fixes to xpointer
2025-06-03 00:59:00 +02:00
Nick Wellnhofer
1fc66d265a
xmllint: Don't check for removed features
2025-06-03 00:33:27 +02:00
Nick Wellnhofer
479f26f92f
regexp: Remove unfinished reimplementation
...
This was never enabled.
2025-06-03 00:28:16 +02:00
Nick Wellnhofer
3d71ab4fa6
doc: Small fixes
2025-06-03 00:17:03 +02:00
Nick Wellnhofer
0ab5d7c557
entities: Deprecate internal DTD-related functions
2025-06-03 00:13:26 +02:00
Nick Wellnhofer
347c2b2ec7
valid: Deprecate a few functions and xmllint --insert
2025-06-02 23:54:28 +02:00
Nick Wellnhofer
f6eec6f4c1
globals: Remove lineNumbersDefaultValue from globals struct
2025-06-02 22:45:19 +02:00
Nick Wellnhofer
ac6ae39192
valid: Readd more argument checks in xmlAddElementDecl
...
Fix crashes with API fuzzer.
2025-06-02 14:33:15 +02:00
Nick Wellnhofer
0f8543e11d
parser: Fix error reporting in xmlSkipBlankCharsPEBalanced
...
Short-lived regression.
2025-06-02 14:19:01 +02:00
Nick Wellnhofer
6a6a46f017
doc: Fix autolink errors
...
Fix links, remove links to internal functions.
2025-05-28 16:02:41 +02:00
Nick Wellnhofer
7bd8d1d9cc
doc: Prefix autolinks with '#'
...
Use `#func` instead of `func()` to ignore parameters and make all
autolinks work.
2025-05-28 16:01:52 +02:00
Nick Wellnhofer
6e33d136e1
error: Fix initGenericErrorDefaultFunc compatibility macro again
...
Now it really should work as before.
2025-05-28 14:57:37 +02:00
Nick Wellnhofer
8baa5de182
parser: Avoid integer overflow in xmlParseCharDataInternal
...
`nbchar` could overflow with larger than 2GB memory buffers which some
new APIs allow. This shouldn't affect memory safety.
Limit maximum amount of bytes passed to character callback to
XML_MAX_ITEMS (1e9).
2025-05-27 20:03:13 +02:00
Nick Wellnhofer
35d04a0848
README: Set expectations straight
...
Fixes #913 .
2025-05-27 20:03:13 +02:00
Nick Wellnhofer
ad346c9a24
tree: Fix integer overflow in xmlBuildQName
...
This issue affects memory safety and might receive a CVE ID later.
Fixes #926 .
2025-05-27 20:03:13 +02:00
Nick Wellnhofer
77c583e0f7
valid: Readd argument check in xmlAddElementDecl
...
Fix crashes with API fuzzer.
2025-05-27 19:55:36 +02:00
Nick Wellnhofer
78454e30e9
io: Remove xmlInputDefaultOpen
...
Not necessary after removal of HTTP client.
2025-05-27 19:55:36 +02:00
Nick Wellnhofer
b79cf4743b
globals: Fix memory leak on Windows DLL unload
...
Thread-local memory must be freed for the main thread as well after
4f08a1a2 .
Fixes #925 .
2025-05-27 19:54:59 +02:00
Nick Wellnhofer
ab06bfa1f6
parser: Fix error return in xmlParseElementContentDecl
...
Avoid internal error later in xmlValidBuildAContentModel after
2a60ca06c .
Also avoids some unnecessary error messages.
2025-05-26 16:51:59 +02:00
Nick Wellnhofer
30cf6d0980
parser: Add XML_INPUT_USE_SYS_CATALOG
...
Also clean up catalog resolution and add error handling using the
global error.
Don't try to look up the resolved URI a second time.
Add some comments. Fix documentation.
2025-05-26 16:51:59 +02:00
Nick Wellnhofer
34bafa14fe
parser: Use parser context as default in resource loader
...
This allows to access the original context for example when using
modules like XInclude or schemas.
2025-05-25 22:47:34 +02:00
Nick Wellnhofer
997830a338
tests: Always use xmlMalloc/xmlFree
2025-05-25 22:47:34 +02:00
Nick Wellnhofer
c136118dcc
README: Mention CMake single/multi-config
2025-05-25 14:26:30 +02:00
Nick Wellnhofer
4dc44c83ab
parser: Rework entity boundary check for element content
...
Only use depth of input stack. This makes the input ID unused
internally.
2025-05-25 14:26:30 +02:00
Nick Wellnhofer
74ea6b483c
parser: Start using input depth for entity boundary check
...
Now that we make sure that PEs starting markup won't be popped
implicitly, it's enough to check that no new entities are on the stack
when checking boundaries.
2025-05-25 14:26:30 +02:00
Nick Wellnhofer
6f8ac9538c
valid: Don't use element namespace for attributes
...
This makes no sense. Unprefixed attributes never have a namespace.
2025-05-25 14:26:30 +02:00
Nick Wellnhofer
5ec83f7741
valid: Remove duplicate #FIXED check for namespaces
...
Unlike the comment indicates, this is already checked.
2025-05-25 14:26:30 +02:00
Nick Wellnhofer
7c10fff265
valid: Don't validate twice in xmlAddAttributeDecl
...
This should only be done in xmlValidateAttributeDecl.
2025-05-25 14:26:30 +02:00
Nick Wellnhofer
db65b2fc51
SAX1: Align handling of default attributes with SAX2
...
The SAX1 parser is legacy code, but it seems more maintainable to align
it with SAX2.
2025-05-25 14:26:30 +02:00
Nick Wellnhofer
e4cbc295fa
parser: Check attribute normalization standalone constraint
...
To fully implement "VC: Standalone Document Declaration", we have to
check for normalization changes caused by non-CDATA attribute types
declared externally.
Fixes #119 .
2025-05-25 14:26:30 +02:00
Nick Wellnhofer
682195c869
parser: Fix "Proper Declaration/PE Nesting" validity constraint
...
Now that we handle "WFC: PE Between Declarations" correctly, we can turn
"Proper Declaration/PE Nesting" from a WFC into VC as specified.
Fixes #118 .
2025-05-25 14:26:30 +02:00
Nick Wellnhofer
74ff6c0028
error: Fix line number in entities
...
Allow line numbers from more domains, see code above.
2025-05-25 14:26:30 +02:00