Log

Author Commit Date CI Message
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 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 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 b9feb816 2024-12-15T17:56:37 xpath: Check reallocations for overflow Factor out node set reallocation.
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 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 3d4f7f47 2024-12-21T18:51:44 meson: Set WITH_HTTP for config.cmake
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 a11c28a6 2024-12-21T18:50:47 meson: Add warning options
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 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
Nick Wellnhofer 84a6eece 2024-11-18T20:40:47 parser: Remove unneeded call to xmlDetectEncoding
Nick Wellnhofer 497081ba 2024-11-17T20:25:07 parser: Remove remaining calls to xml{Push|Pop}Input
Nick Wellnhofer 0f4f8900 2024-11-17T20:13:14 parser: Rename inputPush to xmlCtxtPushInput
Nick Wellnhofer e2ad249c 2024-11-17T19:48:44 parser: Deprecate more internal symbols - xmlParseExternalSubset - xmlPushInput - xmlPopInput - xmlCopyCharMultiByte - xmlCreateEntityParserCtxt - xmlStringComment
Nick Wellnhofer 2fcdc5f7 2024-11-18T20:41:09 globals: More comments on future directions
Nick Wellnhofer 4d1f35b0 2024-11-17T19:45:16 valid: Deprecate more internal functions
Nick Wellnhofer de0c7791 2024-11-17T13:56:19 fuzz: Switch to xmlCtxtValidateDocument This allows to check malloc failure reports during post-validation.
Nick Wellnhofer 5a51f085 2024-11-17T13:50:15 valid: Implement xmlCtxtValidateDocument This allows to use the error handler or resource loader of a parser context.
Nick Wellnhofer 1e1731a4 2024-11-17T13:20:06 valid: Add NULL check in xmlCtxtValidateDtd
Nick Wellnhofer 631778f6 2024-11-17T12:11:41 parser: Check for malloc failure in xmlCtxtParseDtd
Nick Wellnhofer 7f8c436c 2024-11-15T16:30:52 parser: Implement xmlCtxtParseDtd and xmlCtxtValidateDtd This allows to use the context's error handler, options and other settings. Fixes #808.
Nick Wellnhofer 764b8086 2024-11-13T20:22:32 tests: Fix sanitizer version check on old Apple clang See #669.
Nick Wellnhofer b57e022d 2024-11-13T19:08:47 build: Check for icu-uc instead of icu-i18n This should be the ICU component we actually need.
Ruslan Garipov aaecdc92 2024-11-12T16:42:36 parser: Assign value without if-statement This avoids an if-statement, because effectively it does nothing. And, for example, binary artifact generated by GCC with -O2 optimization settings does not contain that if-statement -- the code just uses the hprefix->name field explicitly. No functional changes intended. Signed-off-by: Ruslan Garipov <ruslanngaripov@gmail.com>
Nick Wellnhofer 1e4d8c55 2024-11-06T16:42:05 xmlIO: Fix reading from non-regular files like pipes Commit 7e14c05d removed unnecessary copying of uncompressed input through zlib or xzlib. This broke input from non-regular files like pipes which can't be reopened. Try to detect such files by checking whether they're seekable and always pipe them through zlib or xzlib. Also remove seemingly unnecessary calls to gzread and gzrewind to support unseekable files. Fixes https://gitlab.gnome.org/GNOME/libxslt/-/issues/124.
Nick Wellnhofer 45914614 2024-11-05T12:05:14 xpath: Fix parsing of non-ASCII names Fix a long-standing issue where QNames starting with a non-ASCII character would be rejected. This became more visible after "streaming" XPath evaluation was disabled since the latter handled non-ASCII names correctly. Fixes #818.
Nick Wellnhofer 9201173c 2024-11-05T11:41:28 xmlreader: Fix return value of xmlTextReaderReadString Return NULL if the node has no children or the children were already deleted to match the 2.12 behavior. Fixes #817.
Nick Wellnhofer 869e3fd4 2024-11-01T16:52:31 parser: Fix loading of parameter entities in external DTDs Regressed with commit 12f0bb94. Fixes #816.
Nick Wellnhofer 36117723 2024-10-31T17:38:37 Update README
Nick Wellnhofer 467f4445 2024-10-30T14:03:39 SAX2: Add NULL check for ctxt->myDoc
Nick Wellnhofer efb57ddb 2024-10-30T14:02:36 parser: Fix downstream code that swaps DTDs Downstream code like the nginx xslt module can change the document's DTD pointers in a SAX callback. If an entity from a separate DTD is parsed lazily, its content must not reference the current document. Regressed with commit d025cfbb. Fixes #815.
Nick Wellnhofer 0ec5687e 2024-10-28T20:41:56 parser: Rework xmlCtxtGrowAttrs Remove unneeded argument. Check for integer overflow. We probably hit the buffer size limit in xmlParserGrow before, but better be safe.
Nick Wellnhofer ffb058f4 2024-10-28T20:12:52 parser: Fix detection of duplicate attributes We really need a second scan if more than one namespace clash was detected.
Nick Wellnhofer 89b9f457 2024-10-25T18:02:58 entities: Allow control chars when serializing HTML
Nick Wellnhofer b52a3044 2024-10-24T18:18:47 parser: Use counted_by attribute if supported We only have a single struct with a flexible array member.
Nick Wellnhofer 944e5fe8 2024-10-23T16:46:03 nanohttp: Fix another stdout file descriptor
Nick Wellnhofer 607ada90 2024-10-23T14:19:01 nanohttp: Fix stdout file descriptor Fixes #813.
Nick Wellnhofer b7c0f9d2 2024-10-19T14:26:39 string: Fix va_copy fallback Fix va_copy fallback reworked in 5cffba83. Should fix #812.
Nick Wellnhofer a870088f 2024-10-14T19:58:23 xpath: Hide internal sort functions