summaryrefslogtreecommitdiff
path: root/include/private
Commit message (Collapse)AuthorAgeFilesLines
* parser: Move xmlFatalErr to parserInternals.cNick Wellnhofer2023-04-301-0/+2
|
* parser: Rework EBCDIC code page detectionNick Wellnhofer2023-03-211-1/+2
| | | | | | | | | | To detect EBCDIC code pages, we used to switch the encoding twice and had to be very careful not to decode data after the XML declaration before the second switch. This relied on a hard-coded expected size of the XML declaration and was complicated and unreliable. Now we convert the first 200 bytes to EBCDIC-US and parse the encoding declaration manually.
* parser: Rework shrinking of input buffersNick Wellnhofer2023-03-211-1/+1
| | | | | | | | | | Don't try to grow the input buffer in xmlParserShrink. This makes sure that no memory allocations are made and the function always succeeds. Remove unnecessary invocations of SHRINK. Invoke SHRINK at the end of DTD parsing loops. Shrink before growing.
* parser: Fix short-lived regression causing infinite loopsNick Wellnhofer2023-03-141-0/+2
| | | | | Fix 3eb6bf03. We really have to halt the parser, so the input buffer gets reset.
* parser: Stop calling xmlParserInputShrinkNick Wellnhofer2023-03-131-0/+2
| | | | | Introduce xmlParserShrink which takes a parser context to simplify error handling.
* parser: Stop calling xmlParserInputGrowNick Wellnhofer2023-03-121-0/+2
| | | | | Introduce xmlParserGrow which takes a parser context to simplify error handling.
* xinclude: Fix include guardNick Wellnhofer2023-02-221-3/+3
|
* autotools: Fix make distcheckNick Wellnhofer2023-02-131-0/+1
| | | | | | | - Add private/xinclude.h to EXTRA_DIST - Add runsuite.log to CLEANFILES Fixes #485.
* parser: Improve detection of entity loopsNick Wellnhofer2022-12-231-2/+3
| | | | | Set a flag to detect entity loops at once instead of processing until the depth limit is exceeded.
* entities: Add entity flag for loop checkNick Wellnhofer2022-12-211-2/+4
|
* entities: Use flags to store '<' check resultsNick Wellnhofer2022-12-191-0/+2
| | | | | | | | Instead of abusing the LSB of the "checked" member, store the result of testing for occurrence of '<' character in "flags". Also use the flags in xmlParseStringEntityRef instead of rescanning every time.
* entities: Add XML_ENT_PARSED flagNick Wellnhofer2022-12-191-0/+8
| | | | | | | | To check whether an entity was already parsed, the code previously tested whether "checked" was non-zero or "children" was non-null. The "children" check could be unreliable because an empty entity also results in an empty (NULL) node list. Use a separate flag to make this check more reliable.
* Hide internal functionsNick Wellnhofer2022-11-2718-72/+131
| | | | | | | These functions were never declared in public headers, so it should be safe to hide them. Fixes #139.
* xpath: Make init function privateNick Wellnhofer2022-11-272-0/+7
|
* encoding: Make init function privateNick Wellnhofer2022-11-271-0/+2
|
* threads: Allocate mutexes staticallyNick Wellnhofer2022-11-251-0/+32
|
* dict: Make init/cleanup functions privateNick Wellnhofer2022-11-251-0/+1
|
* threads: Rework initializationNick Wellnhofer2022-11-251-0/+3
| | | | | Make init/cleanup functions private. Merge xmlOnceInit into xmlInitThreadsInternal.
* parser: Make some module init/cleanup functions privateNick Wellnhofer2022-11-253-0/+16
|
* buf: Deprecate static/immutable buffersNick Wellnhofer2022-11-201-1/+0
|
* io: Remove xmlInputReadCallbackNopNick Wellnhofer2022-11-201-1/+0
| | | | | | | | | | | In some cases, for example when using encoders, the read callback was set to NULL, in other cases it was set to xmlInputReadCallbackNop. xmlGROW only tested for xmlInputReadCallbackNop, resulting in errors when parsing large encoded content from memory. Always use a NULL callback for memory buffers to avoid ambiguities. Fixes #262.
* xinclude: Implement "streaming" modeNick Wellnhofer2022-10-301-0/+8
| | | | | | | | | | | | | 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.
* xinclude: Make xmlXIncludeCopyNode non-recursiveNick Wellnhofer2022-10-231-0/+6
| | | | | | | Avoid call stack overflows. Also switch to xmlStaticCopyNode which avoids duplicate namespace definitions.
* Consolidate private header filesNick Wellnhofer2022-08-2615-0/+245
Private functions were previously declared - in header files in the root directory - in public headers guarded with IN_LIBXML - in libxml.h - redundantly in source files that used them. Consolidate all private header files in include/private.