|
4e23892c
|
2023-12-10T19:13:26
|
|
fuzz: Enable value profile
|
|
abd74186
|
2023-12-10T19:07:32
|
|
html: Report malloc failures
Fix many places where malloc failures aren't reported.
Stop checking for ctxt->instate.
|
|
9684e7a0
|
2023-12-10T18:29:44
|
|
writer: Don't call SAX error handler directly
|
|
61b4c42f
|
2023-12-10T18:27:42
|
|
valid: Report malloc failures
Fix many places where malloc failures aren't reported.
|
|
e115194e
|
2023-12-10T18:32:21
|
|
fuzz: Check malloc failure reports in XML fuzzers
|
|
157df344
|
2023-12-10T18:23:53
|
|
xmlreader: Report malloc failures
Fix many places where malloc failures aren't reported.
Introduce a new API function xmlTextReaderGetLastError.
|
|
e58ea29f
|
2023-12-10T18:10:42
|
|
SAX2: Report malloc failures
Fix many places where malloc failures aren't reported.
Improve error handling when parsing entity declarations.
Fixes #308.
|
|
f19a9510
|
2023-12-10T17:50:22
|
|
parser: Report malloc failures
Fix many places where malloc failures aren't reported.
Make xmlErrMemory public. This is useful for custom external entity
loaders.
Introduce new API function xmlSwitchEncodingName.
Change the way how we store whether the the parser is stopped. This used
to be signaled by setting ctxt->instate to XML_PARSER_EOF which was
misdesigned and error-prone. Set ctxt->disableSAX to 2 instead and
introduce a macro PARSER_STOPPED. Also stop to remove parser inputs in
xmlHaltParser. This allows to remove many checks of ctxt->instate.
Introduce xmlErrParser to handle errors if a parser context is
available.
|
|
0d97e439
|
2023-12-10T17:14:57
|
|
save: Report malloc failures
Fix places where malloc failures aren't report.
Introduce a new API function xmlSaveFinish which returns an error code.
|
|
1a354d5b
|
2023-12-10T17:09:45
|
|
regexp: Report malloc failures
Fix places where malloc failures aren't reported.
|
|
e632d9f0
|
2023-12-10T16:56:16
|
|
xpath: Report malloc failures
Fix many places where malloc failures aren't reported.
Rework XPath object cache to store free objects in a linked list to
avoid allocating an additional array. Remove some unneeded object pools.
|
|
f3455ecd
|
2023-12-10T15:46:53
|
|
error: Report malloc failures
Don't ignore malloc failures in xmlRaiseError and xmlCopyError.
Don't print filename if context has no input.
Introduce xmlVRaiseError taking a va_list.
|
|
78eab7a1
|
2023-12-10T18:15:59
|
|
xinclude: Report malloc failures
Fix many places where malloc failures aren't reported.
Introduce a new API function xmlXIncludeGetLastError.
|
|
aca16fb3
|
2023-12-10T16:37:43
|
|
tree: Report malloc failures
Fix many places where malloc failures aren't reported.
Make some API function return an error code. Changing the return type
from void to int is technically an ABI break but should be safe on most
platforms.
- xmlNodeSetContent
- xmlNodeSetContentLen
- xmlNodeAddContent
- xmlNodeAddContentLen
- xmlNodeSetBase
Introduce new API functions that return a separate error code if a
memory allocation fails.
- xmlNodeGetAttrValue
- xmlNodeGetBaseSafe
- xmlGetNsListSafe
Introduce private functions xmlTreeEnsureXMLDecl and xmlSplitQName4.
Don't report low-level errors to the global error handler.
Fix tree
Introduce xmlGetNsListSafe
Fix tree
|
|
e34a49b7
|
2023-12-10T16:29:31
|
|
valid: Improve addition and deletion of IDs
Introduce a new API function xmlAddIDSafe that returns a separate error
code if a memory allocation fails.
Store a pointer to the ID struct in xmlAttr so attributes can be
freed without allocating memory. It's impossible to report malloc
failures in deallocation code.
|
|
e1560990
|
2023-12-10T15:30:47
|
|
pattern: Report malloc failures
Fix places where malloc failures aren't reported.
Introduce a new API function xmlPatternCompileSafe that returns a
separate error code if a memory allocation fails.
|
|
a1f7ecae
|
2023-12-10T15:25:42
|
|
entities: Report malloc failures
Fix places where malloc failures aren't reported.
Introduce new API function xmlAddEntity that returns separate error
codes.
Don't invoke global error handler for low-level errors which should be
handled by higher layers.
Invalid redelcaration warnings will be fixed later.
|
|
2e5d273b
|
2023-12-10T15:21:49
|
|
string: Report malloc failures in xmlStrncat
Don't ignore malloc failures silently.
|
|
c37a9051
|
2023-12-10T15:18:55
|
|
buf: Stop invoking global error handler
Memory errors from low-level code should be handled by higher layers.
|
|
f313848b
|
2023-12-10T15:14:15
|
|
hash: Report malloc failures
Introduce new API functions that return a separate error code if a
memory allocation fails.
- xmlHashAdd
- xmlHashCopySafe
|
|
bd5ad030
|
2023-12-10T14:56:21
|
|
encoding: Report malloc failures
Introduce new API functions that return a separate error code if a
memory allocation fails.
- xmlOpenCharEncodingHandler
- xmlLookupCharEncodingHandler
Fix a few places where malloc failures weren't reported.
|
|
da996c8d
|
2023-12-10T14:46:59
|
|
uri: Report malloc failures
Fix many places where malloc failures weren't reported, for example
after calling xmlStrdup.
Introduce new public API functions that return a separate error code if
a memory allocation fails:
- xmlParseURISafe
- xmlBuildURISafe
- xmlBuildRelativeURISafe
Update the fuzzer to check whether malloc failures are reported.
|
|
7d446e97
|
2023-12-08T12:13:49
|
|
parser: Fix namespaces redefined from default attributes
This regressed in commit e0dd330b.
Also fixes a long-standing issue where namespaces from default
attributes weren't added if they match an existing namespace.
Fixes #643.
|
|
df0b540b
|
2023-12-07T14:40:13
|
|
include: Rename XML_EMPTY helper macro
Avoid name clash with downstream projects.
|
|
a9738e31
|
2023-12-07T14:15:29
|
|
include: Move declaration of xmlInitGlobals
Fix downstream build issues after reworking globals.h.
|
|
52703ffd
|
2023-12-07T12:04:02
|
|
include: Add missing includes
|
|
9122ad0c
|
2023-12-06T19:56:50
|
|
include: Move globals from xmlsave.h to parser.h
Fix downstream build issues after reworking globals.h.
|
|
c011e760
|
2023-12-06T01:09:31
|
|
globals: Remove unused globals from thread storage
Setting these deprecated globals hasn't had an effect for a long time.
Make them constants. This reduces the size of per-thread storage from
~700 to ~250 bytes.
|
|
be558647
|
2023-12-05T21:25:09
|
|
autotools: Fix option description
|
|
cf6e58d6
|
2023-12-05T20:40:20
|
|
build: Disable compiler TLS by default
The global struct is quite large (~700 bytes on 64-bit systems which
will be allocated for each thread whether it uses libxml2 or not) and
already close to the total size limit on some platforms.
Disable compiler TLS by default.
|
|
502971cc
|
2023-12-01T17:49:48
|
|
tree: Another fix related to #538
Should fix #639.
|
|
7f00273c
|
2023-12-01T19:21:17
|
|
parser: Fix invalid free in xmlParseBalancedChunkMemoryRecover
Set the dictionary for newDoc in xmlParseBalancedChunkMemoryRecover.
This is a long-standing bug which was masked by
- xmlParseBalancedChunkMemoryRecover changing the document of the root
node. This is a really bad idea, resulting in a mismatch between
ctxt->myDoc and ctxt->node->doc.
- SAX2.c preferring ctxt->node->doc over ctxt->myDoc until commit
a31e1b06.
Fixes #641.
|
|
4c178040
|
2023-12-01T17:19:55
|
|
globals: Disable TLS in static Windows builds
The cleanup callback would run after TLS was deallocated.
|
|
c7629c9e
|
2023-11-30T16:52:34
|
|
parser: Clarify documentation regarding xmlReadMemory buffer size
Fixes #638.
|
|
e3959461
|
2023-11-30T16:15:46
|
|
html: Reenable buggy detection of XML declarations
Switch to UTF-8 if a document starts with '<?xm' to match old behavior.
Also enable this check in the push parser.
Fixes #637.
|
|
e2ce828c
|
2023-11-28T16:51:06
|
|
cmake: Update config.h.cmake.in
This should enable TLS and destructors.
|
|
5cffba83
|
2023-11-28T15:34:28
|
|
Rework va_copy fallback
va_copy is a macro, so it can be detected without a feature test.
Fallback to __va_copy or memcpy.
|
|
8707838e
|
2023-11-28T13:27:25
|
|
tree: Fix #583 again
Only set doc->intSubset after successful copy to avoid dangling pointers
in error case.
|
|
de3f7014
|
2023-11-28T13:01:38
|
|
tree: Fix regression when copying DTDs
This reverts commit d39f78069dff496ec865c73aa44d7110e429bce9.
Fixes #634.
|
|
ec7f6506
|
2023-11-27T18:03:01
|
|
tests: Fix tests --with-valid --without-xinclude
Fix a copy/paste error from commit 4eba9f9c.
Fixes #632.
|
|
1c7f4c70
|
2023-11-27T12:10:09
|
|
nanohttp: Deprecate public API
The long-term plan is to remove the built-in HTTP client. There are
still a few downstream projects that use libxml2's client for other
purposes. These users should get deprecation warnings now.
|
|
de9af3e5
|
2023-11-27T12:53:58
|
|
DOAP: Add download and issue tracker entries
|
|
75eb9327
|
2023-11-27T12:53:05
|
|
DOAP: Replace defunct mailing list with Discourse support forum
|
|
43b511fa
|
2023-11-26T14:31:39
|
|
parser: Make CRLF increment line number
Partial revert of cb927e85 fixing CRLFs not incrementing the line
number.
This requires to rework xmlParseQNameHashed. The original implementation
prompted the change to xmlCurrentChar which really shouldn't modify the
'cur' pointer as side effect. But the NEXTL macro relies on this
behavior.
Ultimately, we should reintroduce the change to xmlCurrentChar and fix
the NEXTL macro. This will lead to single CRs incrementing the line
number as well which seems more consistent.
Fixes #628.
|
|
455c61d6
|
2023-11-23T15:59:41
|
|
Remove VMS support
This was last updated 10 years ago and is most likely broken.
|
|
7d6969d9
|
2023-11-23T15:48:52
|
|
Remove Trio
Trio is a rather old cross-platform printf library which was bundled with
libxml2. It was needed for ancient pre-C99 systems without snprintf and
should be safe to remove these days.
|
|
f5d4d33b
|
2023-11-23T15:25:54
|
|
tests: Regenerate testapi.c
|
|
e42faa6d
|
2023-11-23T15:25:04
|
|
tests: Remove special handling of const pointers in gentest.py
|
|
ff6c3188
|
2023-11-23T15:22:59
|
|
include: Remove useless 'const' from function arguments
|
|
19b9c59b
|
2023-11-22T08:25:56
|
|
Regenerate testapi.c
|
|
a3971573
|
2023-11-22T08:25:27
|
|
Don't let gentest.py cast types to 'const somethingPtr' to avoid -Wignored-qualifiers
|
|
873c1711
|
2023-11-22T08:23:00
|
|
Avoid EDG -Wignored-qualifiers warnings on wrong 'const *' to '* const' conversions
|
|
6bc86405
|
2023-11-09T02:04:15
|
|
Avoid EDG deprecation warnings for LCC compiler
|
|
c1e9f761
|
2023-11-09T01:44:09
|
|
Avoid EDG -Woverflow warnings on truncating conversions by manually truncating operand
|
|
595c19a5
|
2023-11-08T23:59:56
|
|
Avoid EDG -Wtype-limits warnings on unsigned comparisons with zero by conversion from unsigned int to int
|
|
f8394adf
|
2023-11-08T23:52:27
|
|
Avoid using no_sanitize attribute on EDG even if compiler shows as GCC
|
|
f3c24112
|
2023-11-22T02:00:00
|
|
autotools: Stop checking for snprintf
This works around a bug when cross-compiling to 32-bit MinGW:
https://sourceforge.net/p/mingw-w64/bugs/935/
This means that we don't fall back to the bundled Trio library if
snprintf couldn't be detected. Trio support is completely untested, most
likely broken and will be removed soon.
Fixes #625.
|
|
a2b5c90a
|
2023-11-21T14:35:54
|
|
hash: Fix deletion of entries during scan
Functions like xmlCleanSpecialAttr scan a hash table and possibly delete
entries in the callback. xmlHashScanFull must detect such deletions and
rescan the entry.
This regressed when rewriting the hash table code in 4a513d56.
Fixes #626.
|
|
aca37d8c
|
2023-11-20T15:20:37
|
|
parser: Only enable SAX2 if there are SAX2 element handlers
This reverts part of commit 235b15a5 for backward compatibility and
adds some comments trying to clarify the whole mess.
Fixes #623.
|
|
272cb223
|
2023-11-20T14:22:18
|
|
dict: Fix '__thread' before 'static'
When used with extern or static, __thread must appear immediately after
the other storage class specifier.
Fixes #621.
|
|
62d318f8
|
2023-11-18T14:21:45
|
|
fix: more pthread weak references in globals.c
|
|
1ac88300
|
2023-11-18T12:21:38
|
|
fix: pthread weak references in globals.c
Linking executables will fail on systems with glibc < 2.34 without
declaring these symbols as weak references.
In commit c19771c1f13de9196f98260d142d8c8672eb5733 these references
were moved to globals.c from threads.c, but the `#pragma weak`
declarations were lost in the process.
Also removing unneeded weak declarations from threads.c.
|
|
f92ea2cc
|
2023-11-18T14:36:41
|
|
tests: Fix build with older MSVC
Regressed in 9b5cce7a.
Fixes #620.
|
|
3669316a
|
2023-11-16T13:34:03
|
|
Bump version
|
|
5e9b167d
|
2023-11-16T13:20:16
|
|
Release v2.12.0
|
|
529df196
|
2023-11-15T12:10:25
|
|
parser: Don't overwrite error state in xmlParseTextDecl
Fixes a null deref in xmlLoadEntityContent found by OSS-Fuzz.
|
|
da703eaa
|
2023-11-05T02:03:05
|
|
schemas: Fix reallocation in xmlSchemaXPathProcessHistory
See #614.
|
|
70cc45b8
|
2023-11-05T00:49:40
|
|
parser: Improve attribute hash table
There's no need to grow the hash table dynamically. The size is known
which simplifies the implementation.
|
|
58598494
|
2023-11-04T23:47:33
|
|
parser: Fix combination of hash values
This bug resulted in a stuck bit in hash values which can have a severe
performance impact.
|
|
a31e1b06
|
2023-11-04T20:21:54
|
|
SAX2: Fix quadratic behavior in xmlSAX2AttributeNs
The last missing piece to make parsing of attributes O(n).
|
|
a40c32ac
|
2023-11-04T19:07:37
|
|
doc: Regenerate documentation
|
|
c6820894
|
2023-11-04T19:06:04
|
|
tests: Regenerate testapi.c
|
|
a7b03795
|
2023-11-04T19:04:23
|
|
doc: Minor fixes for apibuild.py
|
|
56944c51
|
2023-11-04T18:54:21
|
|
python: Make sure to distribute new files
Add pyproject.toml and tests/setup_test.py to Makefile.am.
|
|
7a2d412f
|
2023-10-31T20:15:38
|
|
parser: Copy default namespace in xmlParseBalancedChunkMemory
|
|
e0c2f14d
|
2023-10-31T13:53:15
|
|
parser: Copy namespaces in xmlParseBalancedChunkMemory
Reenable copying of namespaces but don't set SAX data. This should
match the old behavior.
|
|
89d19534
|
2023-10-28T03:04:59
|
|
encoding: Fix decoding of large chunks
After 95e81a36, we must support XML_ENC_ERR_SPACE when using built-in
encoding handlers.
Should fix #610.
|
|
0c18af83
|
2023-10-24T15:37:36
|
|
Update NEWS
|
|
61034116
|
2023-10-24T15:02:36
|
|
error: Make more xmlError structs constant
Prepare for future changes, see 45470611.
|
|
6f78efb0
|
2023-10-23T10:16:34
|
|
python: Make it compatible with python3.12
Python 3.12 removes distutils so it's mandatory to use setuptools with
python >= 3.12.
This patch prints a message when trying to run the setup.py script with
a python >= 3.12 without setuptools and try to use the setuptools import
by default.
This patch also creates a new file, pyproject.toml [1], to prepare for
building in modern systems.
[1] https://peps.python.org/pep-0517/
|
|
5221fcd4
|
2023-10-22T16:32:08
|
|
tests: Also test xmlNextChar in testchar.c
|
|
02856674
|
2023-10-22T15:56:46
|
|
parser: Remove redundant IS_CHAR check in xmlCurrentChar
|
|
c082ef46
|
2023-08-09T16:59:36
|
|
parser: Stop switching to ISO-8859-1 on encoding errors
Use U+FFFD Replacement Character if invalid UTF-8 is encountered in
recovery mode.
Also rewrite xmlNextChar and xmlCurrentChar.
Fixes #598.
|
|
a9ada183
|
2023-10-22T13:56:55
|
|
tests: Start with testparser.c for extra tests
Several issues require customized tests. Start with a test that push
parses large documents. See #539.
|
|
572ecc17
|
2023-10-22T13:59:55
|
|
parser: Fix buffer shrinking when push parsing
Short-lived regression from b76d81da.
|
|
253f260b
|
2023-10-18T20:06:35
|
|
threads: Fix --with-thread-alloc
Fixes #606.
|
|
4f132bcd
|
2023-10-14T22:49:29
|
|
fuzz: Raise rss_limit_mb
|
|
c13a0191
|
2023-10-14T22:48:12
|
|
fuzz: Test xmlTextReaderRead after EOF or failure
|
|
e019d97f
|
2023-10-14T22:47:20
|
|
fuzz: Test XML_PARSE_XINCLUDE | XML_PARSE_VALID
|
|
86ef190e
|
2023-10-14T22:43:25
|
|
parser: Fix stack handling in xmlParseTryOrFinish
After commit e0dd330b, this latent bug could cause use-after-free errors
in rare circumstances like using the reader API with recovery and
XIncludes.
|
|
7dfcea03
|
2023-10-11T14:19:04
|
|
dict: Fix integer overflow in xmlDictAddString
Short-lived regression.
Older versions didn't check for integer overflow, but limited name
length to INT_MAX / 2. Reintroduce this limit.
Found by OSS-Fuzz.
|
|
fef12ed8
|
2023-10-11T13:32:54
|
|
buf: Also reset input in error case
Avoid dangling pointers if memory allocation failed. This could cause
a use-after-free after recent changes.
Found by OSS-Fuzz.
|
|
514ab399
|
2023-10-11T13:25:49
|
|
parser: Don't overwrite error state in xmlParseTextDecl
If a memory allocation fails, this could cause a null deref after
recent changes.
Found by OSS-Fuzz.
|
|
821a0370
|
2023-10-09T15:20:00
|
|
parser: Fix memory leak in xmlLoadEntityContent
Found by OSS-Fuzz.
|
|
4fc5340e
|
2023-10-08T14:17:46
|
|
parser: Also grow comment buffer if SAX is disabled
Fix short-lived regression from 8afd321a, found by OSS-Fuzz.
|
|
36374bc9
|
2023-10-08T14:08:44
|
|
parser: Fix error handling in xmlLoadEntityContent
Backup more members of context struct. Fix small accounting error.
|
|
b76d81da
|
2023-10-06T11:50:29
|
|
parser: Fix regression when push parsing parameter entities
Short-lived regression from 834b8123.
Also shrink parameter entity buffers when push parsing.
|
|
134d2ad8
|
2023-10-06T00:31:44
|
|
parser: Protect against quadratic default attribute expansion
|
|
7615fae6
|
2023-10-05T23:52:55
|
|
parser: Make XML_PARSE_NSCLEAN option work again
|
|
0ba22c05
|
2023-10-05T22:05:04
|
|
parser: Support encoded external PEs in entity values
Corner case which was never supported.
|