Log

Author Commit Date CI Message
Nick Wellnhofer 5f1131dd 2025-01-17T19:54:04 xpath: Don't descend into OP_VALUE in debug dump For some reason, its "ch1" value is invalid.
Nick Wellnhofer 00167cae 2025-01-17T18:50:55 xmllint: Report OOM errors to stderr For the validators, some work still has to be done, but for core features, xmllint should now report OOM errors reliably.
Nick Wellnhofer bfe6af2e 2025-01-17T17:09:04 fuzz: Remove hacks to build lint fuzzer Don't include source file directly.
Nick Wellnhofer bf1d8b9c 2025-01-17T18:13:35 xmllint: Report malloc failures from parsing patterns
Nick Wellnhofer 67b738d9 2025-01-17T17:59:21 fuzz: Check whether xmllint reports malloc failures correctly This relies on xmllint's "maxmem" option.
Nick Wellnhofer 255fd5f3 2025-01-17T16:52:06 xmllint: Store error stream in global state
Nick Wellnhofer e42ded42 2025-01-17T16:00:35 xmllint: Stop using global variables The only exception is "maxmem". The custom malloc functions don't support an extra context.
Nick Wellnhofer e4194110 2025-01-17T16:00:05 schemas: Make ValidateStream take a const SAXHandler
Nick Wellnhofer d39e5714 2025-01-17T13:12:36 xmllint: Fix memory leak in parseFile Short-lived regression.
Nick Wellnhofer 0f4d36e0 2025-01-17T13:04:35 xmllint: Fix memory leak in error case
Nick Wellnhofer fbaacfe2 2025-01-16T15:57:35 encoding: Clean up UCS-4 encodings Use "UCS-*" instead of "ISO-10646-UCS-*". While the XML spec recommends "ISO-10646-UCS-2" and "ISO-10646-UCS-4", GNU iconv doesn't understand these names. Ignore UCS4_2143 and UCS4_3412 which were never supported.
Nick Wellnhofer be579a26 2025-01-15T12:52:53 reader: Fix return value of xmlTextReaderReadString again Make sure to return NULL for node types except elements or text to match the old behavior. Note that CDATA sections are still treated like text nodes and will have their content returned. Fixes #838.
Nick Wellnhofer 86401cc3 2025-01-07T19:01:57 xmllint: Make --shell ignore some other options When the shell should be launched with the --shell option, don't post-validate, stream or dump the document. Ignore the --repeat option.
Nick Wellnhofer c0c69cb8 2025-01-07T18:55:35 xmllint: Always reuse parser context Simplifies "repeat" logic.
Nick Wellnhofer a5be2cc3 2025-01-04T22:52:19 xmllint: Support --xpath --debug Dump compiled expression if --debug was supplied.
Nick Wellnhofer f22707f4 2024-12-30T23:21:56 xmllint: Use xmlXPathOrderDocElems for XPath queries
Nick Wellnhofer ca819160 2025-01-03T20:50:08 include: Use intptr_t to cast between pointers and ints
Nick Wellnhofer 41c10c0c 2025-01-03T19:49:37 io: Don't cast file descriptors to pointers This doesn't work if open() returns 0 which is rare but can happen. Wrap the fd in a context struct. Fixes #835.
Nick Wellnhofer 71c37a56 2024-12-30T11:41:44 malloc-fail: Fix memory leak in xmlValidateElementContent
Nick Wellnhofer ab62fc27 2024-12-27T14:58:30 gitlab-ci: Add --with-valid to medium config Building --with-valid --without-regexps enables some rarely tested code. There's an additional test failure in runxmlconf without regexps.
Nick Wellnhofer cd220b93 2024-12-27T14:55:43 valid: Remove duplicate error messages when streaming
Nick Wellnhofer bd2a1648 2024-12-27T13:44:10 valid: Fix build --without-regexps
Nick Wellnhofer 41aed089 2024-12-24T23:50:39 automake: Only build testdso when testing
Nick Wellnhofer 0cf25b3d 2024-12-26T20:32:35 Regenerate docs and testapi.c
Nick Wellnhofer 2e3a91a7 2024-12-26T21:05:18 doc: Fix documentation
Nick Wellnhofer 53c131f6 2024-12-26T20:29:58 doc: Make apibuild.py work again
Nick Wellnhofer 260954c5 2024-12-26T18:17:45 autotools: Set AC_CONFIG_AUX_DIR This should make sure that autoreconf doesn't mess with parent directories. Should fix #833.
Nick Wellnhofer b3871dd1 2024-12-21T21:50:13 io: Fix memory leaks of encoding handler in error cases xmlOutputBufferCreate* must always free the encoding handler.
Nick Wellnhofer afeff9c5 2024-12-21T20:47:40 xinclude: Allow build without XPath This disables XPath queries and makes the tests fail, but might be useful.
Nick Wellnhofer c134e8b4 2024-12-19T21:05:49 include: Make INPUT_CHUNK macro private
Nick Wellnhofer 84a6c82f 2024-12-19T20:59:10 include: Make most IS_* macros private Macros like IS_DIGIT or IS_LETTER severely pollute the C namespace.
Nick Wellnhofer 0d4a17af 2024-12-18T12:02:36 valid: Fix and check return value of nodeVPush
Nick Wellnhofer 3f0bac48 2024-12-11T16:23:30 malloc-fail: Handle more malloc failures in schema code These issues can only arise after a memory allocation failed. - WXS_ADD_*: Add NULL check and raise error - XML_SCHEMA_*: Make macros safe - xmlSchemaParseUnion: Fix leak, raise error, commit after success to avoid memory corruption - xmlSchemaVAddNodeQName: Restore nbItems after partial success, raise error - xmlSchemaIDCAcquireTargetList: Raise error - xmlSchemaXPathProcessHistory: Handle errors - xmlSchemaIDCFillNodeTables: Fix leak - xmlSchemaCheckCVCIDCKeyRef: Handle errors - xmlSchemaVPushText: Reset flag to avoid memory corruption - xmlSchemaNewValidCtxt: Handle errors - xmlSchemaVDocWalk: Fix leak - xmlSchemaInitBasicType: Handle error - xmlSchemaCleanupTypesInternal: Fix null deref - xmlSchemaWhiteSpaceReplace: Handle error - xmlSchemaParseUInt: Handle error - xmlSchemaValAtomicType: Fix leak, handle error - xmlSchemaDateNormalize: Fix leak
Nick Wellnhofer df7cb96c 2024-12-21T18:55:51 build: Set C standard with CMake and meson This should add `/std:c11` to MSVC builds which makes sure that the __STDC_VERSION__ macro is set.
Nick Wellnhofer 3d4f7f47 2024-12-21T18:51:44 meson: Set WITH_HTTP for config.cmake
Nick Wellnhofer a11c28a6 2024-12-21T18:50:47 meson: Add warning options
Nick Wellnhofer 2e18e5dc 2024-12-16T18:54:36 memory: Grow dynamic arrays by 50% Growing by a factor lower than the golden ratio increases the chances of reusing memory freed from earlier allocations. Set growth rate to 1.5 which also reduces internal fragmentation.
Nick Wellnhofer b9feb816 2024-12-15T17:56:37 xpath: Check reallocations for overflow Factor out node set reallocation.
Nick Wellnhofer db8cce3d 2024-12-11T14:16:59 schemas: Check reallocations for overflow
Nick Wellnhofer 0d6136da 2024-12-15T23:23:10 regexp: Check reallocations for overflow
Nick Wellnhofer ae41cf9a 2024-12-15T23:05:06 xinclude: Check reallocations for overflow
Nick Wellnhofer 178b1121 2024-12-15T22:44:39 valid: Check reallocations for overflow
Nick Wellnhofer 8b2d9ac4 2024-12-15T22:37:22 uri: Check reallocations for overflow
Nick Wellnhofer 2042090b 2024-12-15T22:32:12 tree: Check reallocations for overflow
Nick Wellnhofer 307bc230 2024-12-16T01:28:06 pattern: Allocate arrays lazily
Nick Wellnhofer 7b3d1134 2024-12-15T22:06:11 pattern: Check reallocations for overflow
Nick Wellnhofer 3f72a579 2024-12-15T21:53:54 entities: Check reallocations for overflow
Nick Wellnhofer df0f16fa 2024-12-15T21:34:59 encoding: Check reallocations for overflow
Nick Wellnhofer 1c51f3d3 2024-12-15T21:32:36 catalog: Check reallocations for overflow
Nick Wellnhofer 509d4981 2024-12-15T21:30:04 c14n: Check reallocations for overflow
Nick Wellnhofer 58e2e724 2024-12-15T21:23:34 reader: Check reallocations for overflow
Nick Wellnhofer 0447275e 2024-12-15T21:17:07 html: Check reallocations for overflow
Nick Wellnhofer 8231c036 2024-12-15T23:36:04 parser: Check reallocations for overflow
Nick Wellnhofer 5320a4aa 2024-12-15T23:35:28 memory: Implement xmlGrowCapacity to safely grow arrays xmlGrowCapacity makes sure that dynamic arrays don't grow beyond an explicit maximum size. size_t considerations are also taken into account. A macro XML_MAX_ITEMS is provided as default maximum with value 1 billion. When fuzzing, the initial size is set to 1 to cause more reallocations. This can require adjustments if callers really need larger arrays.
Nick Wellnhofer afbc0a04 2024-12-21T16:25:14 xpath: Make contextSize and proximityPosition default to 1 In the general case of processing a single node, these values should be set to 1.
Nick Wellnhofer e014cc57 2024-12-21T16:23:32 xpath: Remove non-standard xf:escape-uri function This undocumented function used an outdated namespace URI and is unlikely to be used these days.
Nick Wellnhofer bf5fcf6e 2024-12-21T16:03:46 xpath: Use separate static hash table for standard functions This avoids registering standard functions when creating an XPath context. Lookup of extension functions is a bit slower now, but ultimately, all function lookups should be moved to the compilation phase.
Nick Wellnhofer 0dd910e8 2024-12-18T23:37:35 save: Fix handling of catastrophic errors Don't overwrite catastrophic errors xmlSaveErr. Overwrite non-catastrophic errors in xmlOutputBufferClose.
Nick Wellnhofer 72f84dd7 2024-12-17T18:26:24 fuzz: Inject IO failures into serialization code
Nick Wellnhofer 0160076f 2024-12-17T17:54:20 save: Forward error from closing IO in xmlSaveFinish
Nick Wellnhofer 169857ad 2024-12-13T15:12:18 xmllint: Check return value of htmlNewParserCtxt
Nick Wellnhofer 1e1b4891 2024-12-13T16:45:38 parser: Also raise error if ctxt is NULL Update global error variable even if context is missing because of an invalid (NULL) argument.
Nick Wellnhofer 6548ba11 2024-12-13T16:37:40 parser: Fix argument checks in xmlCtxtParse* - Raise invalid argument error. - Free input stream if ctxt is NULL.
Nick Wellnhofer 9c980d00 2024-12-13T12:41:46 gitlab-ci: Stop including gnome-release-service-ci-templates This raises a "not found or access denied" error now.
Nick Wellnhofer 0c772751 2024-12-13T02:01:49 cmake: Completely remove deprecated options - LIBXML2_WITH_AUTOMATA - LIBXML2_WITH_EXPR - LIBXML2_WITH_UNICODE
Nick Wellnhofer e6045ed7 2024-12-12T22:09:25 reader: Add argument checks
Nick Wellnhofer 49164610 2024-12-12T22:08:50 reader: Forward catastrophic errors from XInclude
Nick Wellnhofer 8139ad2f 2024-12-12T19:19:47 fuzz: Fix IO error check in reader fuzzer
Nick Wellnhofer 7a9728c1 2024-12-10T21:37:58 gitlab-ci: Re-add llvm This reverts commit d09b07d1b9574c96e047aa19f925b2ee695e436f. Document why some packages are needed.
Nick Wellnhofer d09b07d1 2024-12-10T18:44:26 gitlab-ci: Remove llvm from CI container Untested, but shouldn't be required anymore.
Nick Wellnhofer 5505d235 2024-12-10T00:40:36 Fix typo
Nick Wellnhofer 5ca4ce6f 2024-12-09T23:28:38 gitlab-ci: Add "dist" job to build distribution tarball Prepare for GNOME Release Service.
Nick Wellnhofer 225e0229 2024-12-09T23:28:02 autotools: Add html5ent.inc to EXTRA_DIST
Nick Wellnhofer 8d9c359a 2024-12-09T23:17:55 gitlab-ci: Add xz-utils for distribution tarballs
Nick Wellnhofer 5c9abbf8 2024-12-09T17:17:32 SAX2: Fix xmlSAX2ResolveEntity if systemId is NULL Passing a NULL systemId results in snprintf("%s", NULL) which crashes on some platforms. Regressed with commit 4ff2dccf. Note that systemId should never be NULL during normal parsing. It can only be NULL if API functions are called with a NULL systemId. Should fix #825.
Nick Wellnhofer 92204112 2024-12-07T15:09:46 cmake: Always build Python module as shared library
Nick Wellnhofer 7ca75b32 2024-12-07T15:07:46 python: Declare init func with PyMODINIT_FUNC
Nick Wellnhofer 3b38f19b 2024-11-25T22:37:51 fuzz: Silence more OOM errors
Nick Wellnhofer 9f652e57 2024-11-25T19:41:33 fuzz: Inject IO failures We use the same counter for injecting malloc and IO failures. This mostly renames several functions and variables.
Nick Wellnhofer 754843ab 2024-11-26T02:22:35 fuzz: Remove xmlFuzzEntityLoader Unused after commit de0c7791.
Nick Wellnhofer eae9a1bd 2024-11-26T14:18:22 parser: Pop input stream in xmlCtxtValidateDtd
Nick Wellnhofer 5204c872 2024-11-26T10:40:16 valid: Reset context before validating Reset last error and "stopped" flag. Otherwise new errors could be ignored.
Nick Wellnhofer 70cce2ec 2024-11-26T01:20:54 parser: Make XML_ERR_RESOURCE_LIMIT non-catastrophic
Nick Wellnhofer dafcefb2 2024-11-25T22:22:26 parser: Fail on catastrophic errors in recovery mode
Nick Wellnhofer d3a70754 2024-11-25T21:35:09 xinclude: Fix handling of catastrophic errors - Forward catastrophic errors from parser - Don't overwrite catastrophic errors
Nick Wellnhofer 57087e5f 2024-11-25T20:59:06 parser: Don't overwrite catastrophic errors Stop reporting errors after a catastrophic error. Also make sure that ctxt->errNo matches ctxt->lastError.code.
Nick Wellnhofer 5737466a 2024-11-23T15:49:04 cmake: Only link with winsock2 if HTTP is enabled
Nick Wellnhofer d4fc7b70 2024-11-23T15:43:26 cmake: Fix indentation in libxml2-config.cmake.in
Nick Wellnhofer ec909ed2 2024-11-22T20:24:02 example: Fix indentation in icu.c, mention in NEWS
Saleem Abdulrasool 4e27bbdd 2024-11-22T15:48:07 build: add missing `Bcrypt` link on Windows When building on Windows, we must link against `Bcrypt` to satisfy the use of `BCryptGenRandom`. Add this to the link interface in CMake to allow use of libxml2 as a static library.
Nick Wellnhofer 9cd47487 2024-11-22T19:51:32 doc: Add example for ICU with xmlCtxtSetCharEncConvImpl See #819.
Nick Wellnhofer 2ef1beb3 2024-11-22T18:52:24 cmake: Fix compatibility in package version file See https://github.com/microsoft/vcpkg/issues/42315
Nick Wellnhofer de478472 2024-11-22T00:45:44 build: Remove unused variables
Nick Wellnhofer e9d941f9 2024-11-21T23:38:52 cmake: Only build required source files
Nick Wellnhofer 799104de 2024-11-21T23:38:22 build: Schema doesn't require XPath anymore
Nick Wellnhofer 1dc5e50a 2024-11-21T23:22:40 catalog: Only use XML_SYSCONFDIR if catalogs are enabled
Nick Wellnhofer 52afde07 2024-11-21T23:17:07 build: Only build xmlcatalog executable if enabled
Nick Wellnhofer a5764b56 2024-11-21T22:18:36 build: Define XML_SYSCONFDIR in config.h Rename SYSCONFDIR macro to XML_SYSCONFDIR. Use AX_RECURSIVE_EVAL with Autotools. This is GPL v2 with Autoconf exception which shouldn't be a problem. Finally support meson.
Nick Wellnhofer 0dc26910 2024-11-20T21:04:19 parser: Deprecate more internal functions
Nick Wellnhofer a227a71a 2024-11-20T17:03:11 regexp: Deprecate internal functions