summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* xinclude: Lower initial table size when fuzzingHEADmasterNick Wellnhofer2023-05-111-0/+12
| | | | | | We don't have test cases with many documents, so set the initial table size to 1 when fuzzing, so there is a chance to detect reallocation issues.
* malloc-fail: Fix null deref after xmlXIncludeNewRefNick Wellnhofer2023-05-111-12/+2
| | | | See #344.
* xinclude: Fix false positives in inclusion loop detectionNick Wellnhofer2023-05-111-1/+5
| | | | xmlXIncludeRecurseDoc can realloc the cache.
* autotools: Fix ICU detectionNick Wellnhofer2023-05-101-1/+1
| | | | Fixes #540.
* parser: Fix "huge input lookup" error with push parserNick Wellnhofer2023-05-091-2/+3
| | | | | | Fix parsing of larger documents without XML_PARSE_HUGE. Should fix #538.
* SAX: Always validate xml:idsNick Wellnhofer2023-05-093-12/+0
| | | | The behavior shouldn't depend on mostly random configuration options.
* Stop using sprintfNick Wellnhofer2023-05-082-7/+9
| | | | Switch remaining users to snprintf.
* xpath: Fix build without LIBXML_XPATH_ENABLEDNick Wellnhofer2023-05-081-108/+108
| | | | | | | Move static function declaration into XPATH block. Also move comparison functions. Fixes #537.
* SAX: Always initialize SAX1 element handlersNick Wellnhofer2023-05-082-8/+8
| | | | | | | | | Follow-up to commit d0c3f01e. A parser context will be initialized to SAX version 2, but this can be overridden with XML_PARSE_SAX1 later, so we must initialize the SAX1 element handlers as well. Change the check in xmlDetectSAX2 to only look for XML_SAX2_MAGIC, so we don't switch to SAX1 if the SAX2 element handlers are NULL.
* autoconf: fix iconv library pathsMike Dalessio2023-05-062-4/+6
| | | | | | and pass cflags when building executables See 0f77167f for prior related work
* parser: Fix old SAX1 parser with custom callbacksNick Wellnhofer2023-05-061-2/+0
| | | | | | | | | | For some reason, xmlCtxtUseOptionsInternal set the start and end element SAX handlers to the internal DOM builder functions when XML_PARSE_SAX1 was specified. This means that custom SAX handlers could never work with that flag because these functions would receive the wrong user data argument and crash immediately. Fixes #535.
* hash: Fix possible startup crash with old libxslt versionsNick Wellnhofer2023-05-061-0/+2
| | | | | | | | | | Call xmlInitParser in xmlHashCreate to make it work if the library wasn't initialized yet. Otherwise, exsltRegisterAll from libxslt 1.1.24 or older might cause a crash. See #534.
* regexp: Fix null deref in xmlFAFinishReduceEpsilonTransitionsNick Wellnhofer2023-05-041-0/+2
| | | | Short-lived regression found by OSS-Fuzz.
* Fix compiler warning on GCC < 8Nick Wellnhofer2023-05-031-7/+13
| | | | -Wcast-function-type is only available since GCC 8.
* threads: Fix startup crash with weak symbol hackNick Wellnhofer2023-05-031-8/+17
| | | | | Fix another issue when running with older libc, threads and libpthread not linked in.
* dict: Raise MAX_DICT_HASH limitNick Wellnhofer2023-05-032-68/+55
| | | | | | This fixes quadratic behavior with large dictionaries. Also rework testdict.c to support tests with larger dictionaries.
* win32: Don't depend on removed .def fileNick Wellnhofer2023-05-022-17/+3
| | | | | | Fixes broken build after 21cec82b. Fixes #532.
* regexp: Fix mistake in previous commitNick Wellnhofer2023-05-021-1/+0
| | | | | | The `ret = 0` line should have been deleted. Fixes #531.
* regexp: Fix determinism checksNick Wellnhofer2023-04-301-11/+23
| | | | | | | | | | | | | | | | | | | | | Swap arguments in initial call to xmlFARecurseDeterminism. Fix the check whether we revisit the initial state in xmlFARecurseDeterminism. If there are transitions with equal atoms and targets but different counters, treat the regex as deterministic but mark the transitions as non-deterministic internally. Don't overwrite zero return value of xmlFAComputesDeterminism with non-zero value from xmlFARecurseDeterminism. Most of these errors lead to non-deterministic regexes not being detected which typically isn't an issue. The improved code may break users who relied on buggy behavior or cause other bugs to become visible. Fixes #469.
* regexp: Fix checks for eliminated transitionsNick Wellnhofer2023-04-301-6/+6
| | | | | 'to' can be set to -1 or -2 when eliminating transitions, so check for all negative values.
* regexp: Simplify xmlFAReduceEpsilonTransitionsNick Wellnhofer2023-04-301-29/+20
|
* regexp: Fix cycle check in xmlFAReduceEpsilonTransitionsNick Wellnhofer2023-04-301-0/+26
| | | | | | | | The visited flag must only be reset after the first call to xmlFAReduceEpsilonTransitions has finished. Visiting states multiple times could lead to unnecessary processing of duplicate transitions. Similar to 68eadabd.
* tests: Test streaming schema validationNick Wellnhofer2023-04-301-45/+63
|
* schemas: Fix filename in xmlSchemaValidateFileNick Wellnhofer2023-04-301-34/+58
| | | | Make sure that filename appears in error messages.
* schemas: Fix line numbers in streaming validationNick Wellnhofer2023-04-301-2/+8
|
* schemas: Fix memory leak in xmlSchemaValidateStreamNick Wellnhofer2023-04-301-3/+12
| | | | | | Regressed in 9a82b94a. Fixes #530.
* runtest: Skip element name in schema error messagesNick Wellnhofer2023-04-3075-94/+98
| | | | | This makes sure that memory and streaming tests will report the same messages.
* writer: Add error check in xmlTextWriterEndDocumentNick Wellnhofer2023-04-301-1/+5
|
* encoding: Stop calling xmlEncodingErrNick Wellnhofer2023-04-301-56/+6
| | | | This invokes the global error handler which should be avoided.
* xmlIO: Remove some calls to xmlIOErrNick Wellnhofer2023-04-301-4/+3
| | | | | The xmlIOErr functions use the global error handler and should be avoided if possible.
* parser: Improve handling of encoding and IO errorsNick Wellnhofer2023-04-306-39/+116
| | | | | | Make sure that xmlCharEncInput, xmlParserInputBufferPush and xmlParserInputBufferGrow set the correct error code in the xmlParserInputBuffer. Handle errors when calling these functions.
* parser: Move xmlFatalErr to parserInternals.cNick Wellnhofer2023-04-303-216/+224
|
* encoding: Rework error codesNick Wellnhofer2023-04-302-378/+194
| | | | | | | Use an enum instead of magic numbers. Fix a few error codes. Simplify handling of "space" and "partial" errors. See #506.
* .gitignore: Split up and rearrange .gitignore filesNick Wellnhofer2023-04-304-77/+84
|
* .gitignore: Add runsuite.logNick Wellnhofer2023-04-301-0/+1
|
* Stop calling xmlMemoryDumpNick Wellnhofer2023-04-3068-109/+1
| | | | | | This was used to check for memory leaks but could potentially create a .memdump file. These days, there are better ways to check for memory leaks.
* examples: Don't call xmlCleanupParser and xmlMemoryDumpNick Wellnhofer2023-04-3018-272/+101
| | | | | | | xmlCleanupParser is dangerous and shouldn't be called in most cases. Being part of the examples led many people to use it incorrectly. xmlMemoryDump is an obsolete way to test for memory leaks.
* libxml.m4: Fix "possibly undefined macro" errorNick Wellnhofer2023-04-301-1/+1
| | | | See #527.
* cmake: Fix va_copy detectionLuca Niccoli2023-04-301-2/+2
| | | | | | | va_copy is defined by the standard as a macro, so check_function_exists will not detect it; check_symbol_exists will. Fixes #528.
* xpath: Remove remaining references to valueFrameNick Wellnhofer2023-04-303-3/+2
| | | | Fixes #529.
* cmake: Link with --undefined-versionNick Wellnhofer2023-04-291-2/+7
|
* autoconf: Only use --undefined-version with version scriptsNick Wellnhofer2023-04-291-5/+4
|
* libxml.m4: Fix quotingNick Wellnhofer2023-04-291-1/+1
| | | | Should fix #527.
* Link with --undefined-versionNick Wellnhofer2023-04-295-0/+188
| | | | | | | lld 16 defaults to --no-undefined-version but the version script can contain symbols disabled by configuration options. See #473.
* libxml2.syms: Revert removal of version informationNick Wellnhofer2023-04-291-48/+2282
| | | | | | | | | Removing version information caused problems when relinking with shared libraries depending on libxml2. It also broke the ABI on Android. Revert libxml2.syms to the 2.10.0 version. Fixes #526.
* Clean up .gitignoreNick Wellnhofer2023-04-281-34/+0
| | | | Remove stuff which probably shouldn't be ignored.
* Bump version to 2.12.0Nick Wellnhofer2023-04-281-1/+1
|
* Release v2.11.0v2.11.0Nick Wellnhofer2023-04-281-0/+419
|
* Regenerate docs and testapi.cNick Wellnhofer2023-04-2626-637/+557
|
* autoconf: Add AC_LANG_SOURCE to fix warningNick Wellnhofer2023-04-261-1/+1
|