|
477a7ed8
|
2023-12-28T19:06:32
|
|
html: Abort earlier on fatal errors
|
|
5f319304
|
2023-12-28T19:05:51
|
|
SAX2: Fix error code
Today I learned that the TSCII character encoding [1] can blow up the
size of text 12 times when converted to UTF-8:
$ printf '\x82' |iconv -f TSCII -t UTF-8 |hexdump -C
00000000 e0 ae b8 e0 af 8d e0 ae b0 e0 af 80
0000000c
[1] https://en.wikipedia.org/wiki/Tamil_Script_Code_for_Information_Interchange
|
|
ab631971
|
2023-12-28T17:07:03
|
|
uri: Keep fragment intact when resolving filesystem paths
|
|
b8313b58
|
2023-12-26T21:59:08
|
|
xpath: Rewrite substring-before and substring-after
Don't use buffers. Check malloc failures.
|
|
3874e5d0
|
2023-12-26T01:42:23
|
|
tests: Remove unneeded error formatting code
|
|
2a2fbe1e
|
2023-12-28T16:42:03
|
|
xinclude: Only set xml:base if necessary
|
|
8a685a3d
|
2023-12-26T00:42:22
|
|
xinclude: Allow empty nodesets
There's no reason to treat an empty nodeset as error.
|
|
f3fa34dc
|
2023-12-26T22:37:26
|
|
parser: Fix general entity parsing
Clear namespace database.
Ignore non-fatal errors.
|
|
60841beb
|
2023-12-25T18:31:22
|
|
parser: Make XML_IO_NETWORK_ATTEMPT behave as before
Always reported to generic error, not to parser context for backward
compatibility. Several downstream test suites rely on this behavior.
|
|
a2693410
|
2023-12-23T00:35:30
|
|
io: Move some code from xmlIO.c to parserInternals.c
Move everything related to parser contexts to parserInternals.c.
|
|
ecfbcc8a
|
2023-12-25T04:33:00
|
|
parser: Rework general entity parsing
Don't create a new parser context but reuse the existing one.
This exposes bug #601 in a more obvious way.
|
|
8ab1b122
|
2023-12-23T00:00:15
|
|
Fix filename and URI handling
Many strings are passed to the library that could be either URIs or
filesystem paths. We now assume that strings are a URI if they contain
the substring "://". This means that they have a scheme and an
authority. Otherwise, URI resolution wouldn't make much sense.
Fix xmlBuildURI to work with filesystem paths. If the base URI doesn't
contain "://" it is treated as filename. The resolved URI is unescaped,
appended and the result is normalized. Rewrite xmlNormalizePath to
handle Windows quirks.
All special handling for Windows paths is removed in xmlCanonicPath.
If the path looks like an URI, only escape characters allowed in Legacy
Extended IRIs.
Make xmlPathToURI only call xmlCanonicPath. Theh additional round-trip
through URI parser and serializer seems useless.
Add a helper function xmlConvertUriToPath in xmlIO.c which checks for
file URIs and unescapes them.
Always process strings with xmlCanonicPath in xmlLoadExternalEntity.
This should be harmless now.
Should help with #334, #387, #611.
|
|
28913232
|
2023-12-22T23:58:43
|
|
uri: Clean up special parsing modes
Add function to handle unreserved check. Give flags meaningful names.
Add support to allow ucschars from Legacy Extended IRIs.
|
|
c2ef78f7
|
2023-12-24T23:56:57
|
|
io: Fix close error handling
There's no way to report error codes from closing an output buffer yet.
|
|
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.
|
|
35a4bc50
|
2023-12-22T15:14:19
|
|
xinclude: Report to xmlGenericError
|
|
6d27c549
|
2023-12-24T17:59:02
|
|
io: Fix read/write error handling
Handle short reads/writes from fd. Fix stdio error handling.
|
|
e8de3401
|
2023-12-22T02:57:19
|
|
parser: Also set document properties when push parsing
Add new function xmlFinishDocument which invokes the endDocument SAX
handler and sets the document's properties.
|
|
c73de050
|
2023-12-23T04:50:47
|
|
include: Move non-generated parts from xmlversion.h.in
xmlexports.h originally only included symbol visibility macros but it's
a good place for other macros as well.
|
|
0bef93bf
|
2023-12-23T04:03:41
|
|
io: More refactoring and unescaping fixes
Merge Windows wrappers into relevant functions.
Remove more unnecessary unescaping.
Merge *OpenW into *Open functions.
Use unbuffered IO for output.
|
|
331dcd62
|
2023-12-23T01:40:54
|
|
error: Reenable full error reports to default handler
This should make console output include some information about nodes
again. Note that this extra information must be disabled if a custom
generic error handler was set. Many downstream test suites rely on this
behavior.
|
|
c1bddd4c
|
2023-12-23T01:09:17
|
|
parser: Mark 'length' member of xmlParserInput as unused
|
|
955c177f
|
2023-12-23T00:58:36
|
|
parser: Stop using 'directory' struct member
This was only used as a pointless fallback for URI resolution.
|
|
a18d9416
|
2023-12-21T18:39:44
|
|
Update NEWS
|
|
229e5ff7
|
2023-12-21T18:09:42
|
|
io: Remove support for HTTP POST
This feature is unlikely to be used these days.
|
|
9c2c87b5
|
2023-12-24T15:33:12
|
|
dict: Move local RNG state to global state
Don't use TLS variables directly.
|
|
2e9e758d
|
2023-12-24T14:27:46
|
|
dict: Get random seed from system PRNG
|
|
c49572e5
|
2023-12-23T15:03:22
|
|
malloc-fail: Fix erroneous report in xmlStringGetNodeList
The parser can produce invalid attribute content in recovery mode.
Unless this is fixed, xmlStringGetNodeList should ignore such errors
silently.
|
|
c8f1f4a2
|
2023-12-21T17:30:38
|
|
doc: Improve documentation of error handlers
|
|
882b3a80
|
2023-12-21T15:34:24
|
|
runtest: Fix return code in rngTest
|
|
8cd56317
|
2023-12-21T02:32:01
|
|
html: Don't close fd in htmlCtxtReadFd
Long-standing bug. The XML fix from 2003 was never ported to the HTML
parser. htmlReadFd was fixed with fe6890e2.
|
|
0a658c0f
|
2023-12-20T23:53:19
|
|
io: Don't use "-" to read from stdin
To implement this feature on such a low level is a disaster waiting to
happen. Remove these checks from the IO code and move them to xmllint.
Note that the serialization API will still treat "-" as stdout.
|
|
c9a46a91
|
2023-12-20T20:11:09
|
|
io: Rework initialization
|
|
b75fc1ab
|
2023-12-20T20:01:19
|
|
io: Rearrange code
|
|
13043691
|
2023-12-20T00:33:34
|
|
parser: Rename xmlErrParser to xmlCtxtErr
|
|
8d0aaf4b
|
2023-12-19T20:47:36
|
|
parser: Remove xmlErrEncoding
Use xmlFatalErr or xmlCtxtErrIO.
|
|
9fbe46ba
|
2023-12-19T20:10:10
|
|
io: Consolidate error messages
|
|
23345a1c
|
2023-12-19T19:52:28
|
|
io: Report IO errors through xmlCtxtErrIO
This is also a new public API function to be used in external entity
loaders.
|
|
e62b0dbd
|
2023-12-19T19:47:07
|
|
xzlib: Fix harmless unsigned integer overflow
|
|
1ef35663
|
2023-12-19T19:36:35
|
|
io: Always use unbuffered input
Before, we often used unbuffered input via the lzma or gzip handlers,
more or less inadvertently.
Change the default file handlers from buffered (stdc FILE) to unbuffered
(POSIX fds).
|
|
7e14c05d
|
2023-12-19T17:05:08
|
|
io: Fix detection of compressed streams
Make sure that we don't try to open uncompressed streams with a
compression handler in copying mode.
|
|
7e511f35
|
2023-12-19T15:41:37
|
|
io: Pass error codes from xmlFileOpenReal to xmlNewInputFromFile
This allows to report the reason why opening a file failed to the parser
context and improve error messages. Now we can also remove the stat call
before opening a file.
|
|
b2dbcc43
|
2023-12-19T13:33:59
|
|
io: Rework default callbacks
Register a dummy callback struct for default callbacks. Handle them in a
separate function which will later allow to return meaningful error
codes.
|
|
531d06ad
|
2023-12-18T22:48:24
|
|
error: Stop printing some errors by default
Unfortunately, it's long-standing behavior for libxml2 to print all
reported errors to stderr by default. This default behavior is now
partially disabled. If no error handler is set, only parser and
validation errors are passed to a generic error handler or printed to
stderr. Other errors are still available via xmlGetLastError and can be
captured with a structured error handler.
|
|
0c7a364f
|
2023-12-18T21:55:50
|
|
error: Remove xmlSimpleError
|
|
f9f5c2d8
|
2023-12-18T21:44:06
|
|
xmllint: Don't use xmlGenericError
|
|
e9c01c30
|
2023-12-18T21:41:30
|
|
runtest: Test with per-context error handlers
Only set the global error handler where needed.
Don't use xmlGenericError.
|
|
05d9bacd
|
2023-12-18T21:39:51
|
|
regexp: Improve error handling
Handle malloc failure from xmlRaiseError.
Use xmlRaiseMemoryError.
Remove argument from memory error handler.
Remove TODO macro.
|
|
ecb4c9fb
|
2023-12-18T21:32:49
|
|
misc: Improve error handling
Remove calls to generic error handler or use stderr for
- legacy deprecation warnings
- nanohttp, nanoftp in standalone mode
- memory debug messages
Use xmlRaiseMemoryError.
Remove TODO macro.
Don't raise errors in xmlmodule.c.
|
|
bc1e0306
|
2023-12-18T21:30:22
|
|
save: Improve error handling
Handle malloc failrue from xmlRaiseError.
Use xmlRaiseMemoryError.
Stop using xmlGenericError.
Remove argument from memory error handler.
Remove TODO macro.
|
|
664db89e
|
2023-12-18T21:25:28
|
|
schematron: Improve error handling
Implement xmlSchematronVErr.
Handle malloc failure from xmlRaiseError.
Stop using xmlGenericError.
Remove argument from memory error handler.
Use xmlRaiseMemoryError.
Remove TODO macro.
|
|
f0df3e6d
|
2023-12-21T14:35:18
|
|
tests: Try to fix RelaxNG test cases
These were added recently in ea695ac0 and 8074b881 but were a total mess
of symbolic links and apparently mixed up files.
Symbolic links don't work on Windows.
Try to salvage one of the tests.
|
|
83c6aeef
|
2023-12-18T21:12:29
|
|
relaxng: Improve error handling
Pass RelaxNG structured error handler to XML parser.
Handle malloc failure from xmlRaiseError.
Remove argument from memory error handler.
Use xmlRaiseMemoryError.
Don't use xmlGenericError.
Remove TODO macro.
|
|
be76b7df
|
2023-12-18T21:09:39
|
|
debug: Improve error handling
Print to debug output instead of global error handler.
|
|
25e22011
|
2023-12-18T20:58:42
|
|
c14n: Improve error handling
Handle malloc failure from xmlRaiseError.
Add context argument to error functions.
Remove argument from memory error handler.
Use xmlRaiseMemoryError.
|
|
6cb8420a
|
2023-12-18T20:54:26
|
|
catalog: Improve error handling
Handle malloc failures from xmlRaiseError.
Remove arguments from memor error handler.
Remove TODO macro.
Make debugging code print to stderr instead of xmlGenericError.
|
|
06c00f65
|
2023-12-18T19:51:32
|
|
schemas: Improve error handling
Introduce xmlSchema*ErrFull which checks for memory allocation failures
during error reporting.
Remove arguments from memory error handlers.
Use xmlRaiseMemoryError.
Remove TODO macro.
|
|
ed6596a4
|
2023-12-18T19:47:47
|
|
reader: Simplify error handling
Only use structured error handlers for parser, Schemas and RelaxNG
contexts. Also use structured error handler for XInclude context.
Remove TODO macro.
|
|
2829a21a
|
2023-12-18T19:43:55
|
|
xinclude: Improve error handling
Introduce xmlXIncludeSetErrorHandler allowing to set a structured error
handler for an XInclude context and forwarding errors from parser.
Remove arguments from memory error handlers.
Use xmlRaiseMemoryError.
|
|
954b8984
|
2023-12-18T19:39:38
|
|
xpath: Improve error handling
Introduce xmlXPathSetErrorHandler allowing to set a structured error
handler for an XPath context.
Remove arguments from memory error handlers.
Use xmlRaiseMemoryError.
Remove TODO, STRANGE and CHECK_CTXT macros.
Remove remaining uses of xmlGenericError.
|
|
54c70ed5
|
2023-12-18T19:31:29
|
|
parser: Improve error handling
Introduce xmlCtxtSetErrorHandler allowing to set a structured error for
a parser context. There already was the "serror" SAX handler but this
always receives the parser context as argument.
Start to use xmlRaiseMemoryError.
Remove useless arguments from memory error functions. Rename
xmlErrMemory to xmlCtxtErrMemory.
Remove a few calls to xmlGenericError.
Remove support for runtime entity debugging.
|
|
c5a8aef2
|
2023-12-18T19:12:08
|
|
error: Refactor error reporting
Introduce xmlStrVASPrintf, trying to handle buggy snprintf
implementations.
Introduce xmlSetError to set errors atomically.
Introduce xmlUpdateError to set an error, fixing up node, file and line.
Introduce helper function xmlRaiseMemoryError.
Make legacy error handlers call xmlReportError, avoiding checks in
xmlVRaiseError.
Remove fragile support for getting file and line info from XInclude
nodes.
|
|
ed3ad3e1
|
2023-12-20T11:42:08
|
|
Makefile.am: omit $(top_builddir) from DEPS and LDADDS
BSD make is less liberal than GNU make in matching targets, and so it
tries to resolve the dependency `./libxml2.la` and fails to match the
target `libxml2.la`.
|
|
6fdc20ba
|
2023-12-20T18:33:29
|
|
xpath: Don't free nodes of XSLT result value trees
This feature hasn't been required for a long time and libxslt works
around by manually setting 'boolval' to 0.
|
|
bcefef20
|
2023-12-20T14:40:27
|
|
malloc-fail: Report malloc failure in xmlXPathNumberFunction
|
|
355fbe3a
|
2023-12-16T15:02:43
|
|
valid: Fix handling of enumerations
Make xmlFreeEnumeration, xmlCopyEnumeration and xmlDumpEnumeration
non-recursive. Report malloc failure in xmlCopyEnumeration.
|
|
6ae98ebc
|
2023-12-15T14:53:44
|
|
malloc-fail: Report malloc failure in xmlXPathTranslateFunction
|
|
69d88566
|
2023-12-15T14:46:35
|
|
malloc-fail: Fix OOM error handling in xmlSwitchInputEncoding
Make sure that in->buffer won't be set to NULL if a memory allocation fails.
Short-lived regression.
|
|
6c8acdec
|
2023-12-14T13:37:43
|
|
save: Fix build --without-html
Fixes #646
|
|
5d2dbe79
|
2023-12-14T13:37:25
|
|
parser: Fix build --without-output
Fixes #647
|
|
d6812f3a
|
2023-12-14T13:35:13
|
|
Fix compiler warnings with disabled modules
|
|
1c106edf
|
2023-12-13T23:56:19
|
|
parser: Allow recovery in xmlParseInNodeContext
Should fix #645.
|
|
023aecc4
|
2023-12-13T23:45:53
|
|
encoding: Support ASCII in xmlLookupCharEncodingHandler
Return our built-in ASCII handler. This was never implemented and
triggered the new and stricter error checks.
|
|
79a9938d
|
2023-12-13T17:25:37
|
|
parser: Don't grow or shrink pull parser memory buffers
Readd check for memory buffers without a read callback to avoid
XML_MAX_LOOKUP_LIMIT errors if users provide a custom input buffer.
Regressed with commit 834b8123 and later changes.
|
|
0e201722
|
2023-12-13T14:14:15
|
|
python: Fix callback signature
Found with UBSan.
|
|
862e9ce0
|
2023-12-13T14:53:44
|
|
malloc-fail: Fix use-of-uninitialized-value in xmlParseConditionalSections
Short-lived regression.
|
|
0ea47327
|
2023-12-13T14:44:29
|
|
malloc-fail: Fix memory leak in xmlNodeGetBaseSafe
Short-lived regression.
|
|
c2bbeed1
|
2023-12-12T23:51:32
|
|
io: Fix memory lifetime issue with input buffers
xmlParserInputBufferCreateMem must make a copy of the buffer.
This fixes a regression from 2.11 which could cause reads from freed
memory depending on the use case.
Undeprecate xmlParserInputBufferCreateStatic which can avoid copying
the whole buffer.
|
|
0e4a11bb
|
2023-12-12T22:00:20
|
|
doc: Add notes about breaking ABI in MAINTAINERS.md
|
|
8e13133d
|
2023-12-12T15:13:11
|
|
malloc-fail: Don't truncate parser input buffer
We now follow a laissez-faire approach when handling malloc failures and
removed many checks whether the parser was stopped by such an error.
This means the parser input must not be truncated to avoid out-of-bounds
reads.
Short-lived regression.
|
|
8583b9f1
|
2023-12-12T15:00:44
|
|
malloc-fail: Fix null deref in xmlXPathTranslateFunction
Short-lived regression.
|
|
5c06f4e3
|
2023-12-12T14:37:17
|
|
malloc-fail: Fix erroneous reports in xmlNodeListGetString
Short-lived regression.
|
|
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.
|
|
e115194e
|
2023-12-10T18:32:21
|
|
fuzz: Check malloc failure reports in XML fuzzers
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|