1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-25 06:03:34 +03:00

6736 Commits

Author SHA1 Message Date
Rosen Penev
4b2f250a5b meson: don't use dl dependency on old meson
dl dependency was introduced with version 0.62.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-03 14:33:52 -07:00
Rosen Penev
0160127fda meson: fix usage as a subproject
include directories must be passed to that projects can use headers.

Also add override_dependencies to make sure that it's used when
available as a subproject.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-06-03 14:33:07 -07:00
Nick Wellnhofer
a7e26707be parser: Don't overwrite OOM errors in xmlSBuf 2024-06-03 14:04:44 +02:00
Nick Wellnhofer
f0d891585d entities: Unconst predefined entities
Partial revert of commit 63ce5f9a. For some reason, Chromium and WebKit
set the etype member of predefined entities. This should be fixed first.
2024-06-01 15:41:43 +02:00
Nick Wellnhofer
5198de4b1d fuzz: Make allocation in xmlBuildQName more likely
Limit size of static buffer in fuzzing mode.
2024-05-31 13:42:08 +02:00
Nick Wellnhofer
11cd18d879 valid: Check return value of xmlValidBuildAContentModel
Fixes return code in case of malloc failure.
2024-05-31 13:31:09 +02:00
Nick Wellnhofer
ec09909dd3 autotools: Fix pthread detection on FreeBSD
pthread_join is defined by libc, so check for pthread_create instead.

Should fix #725.
2024-05-29 13:47:37 +02:00
Nick Wellnhofer
b7f30bae7b fuzz: Fix aarch64 build on OSS-Fuzz 2024-05-28 22:52:30 +02:00
Nick Wellnhofer
e349709ae7 build: Remove --with-fexceptions configuration option 2024-05-21 21:07:16 +02:00
Nick Wellnhofer
f524993e70 build: Clean up configuration options
Remove run-debug from meson. Fix documentation.
2024-05-21 21:05:32 +02:00
Nick Wellnhofer
11ce63f02b build: Don't check for isascii 2024-05-21 20:40:30 +02:00
Nick Wellnhofer
6f2a597383 build: Don't check for uint32_t 2024-05-21 20:40:30 +02:00
Nick Wellnhofer
5c9e0ebe71 autotools: Change ICU message
Only log non-default actions.
2024-05-21 20:40:28 +02:00
Nick Wellnhofer
54629e0f75 autotools: Remove --with-coverage configuration option 2024-05-21 20:25:23 +02:00
Nick Wellnhofer
e80f27fc81 build: Don't check for inttypes.h
This header isn't used.
2024-05-21 18:37:57 +02:00
Nick Wellnhofer
dda69626b9 autotools: Only check for networking headers if required 2024-05-21 18:31:37 +02:00
Nick Wellnhofer
1371d0bda2 Update NEWS 2024-05-21 00:31:02 +02:00
Nick Wellnhofer
bd7cafdbce meson: Add some TODO comments 2024-05-20 23:59:55 +02:00
Nick Wellnhofer
3018842c07 build: Disable HTTP support by default 2024-05-20 23:59:55 +02:00
Nick Wellnhofer
5b1d7ff0b2 parser: Remove redefinitions for legacy globals 2024-05-20 23:59:55 +02:00
Nick Wellnhofer
e75e878e02 doc: Update and fix documentation 2024-05-20 14:23:39 +02:00
Nick Wellnhofer
9523438ad4 doc: Allow missing author 2024-05-20 14:22:56 +02:00
Nick Wellnhofer
a800e0035c doc: Allow missing desc if we have a retdesc
Allow missing function descriptions if the return value is documented.
2024-05-20 14:22:56 +02:00
Nick Wellnhofer
b47a95fe31 parser: Don't make xmlCtxtErrIO public 2024-05-20 14:22:56 +02:00
Nick Wellnhofer
caa8bb3848 fuzz: Move back to xmlSetExternalEntityLoader
xmlParserInputBufferCreateFilenameDefault can't report malloc failures.
2024-05-19 19:39:22 +02:00
Nick Wellnhofer
4fefba4cf6 parser: Rework handling of undeclared entities
Throw an error if entity substitution was requested.

Now we only downgrade to a warning if

- XML_PARSE_DTDLOAD wasn't specified, and
- entity aren't substituted or XML_PARSE_NO_XXE was specified.

Should fix #724.
2024-05-15 17:58:48 +02:00
Nick Wellnhofer
51b5d1e378 fuzz: Don't enable zlib and liblzma with MSan
We'd need our own instrumented builds of these libraries.
2024-05-15 16:21:11 +02:00
Nick Wellnhofer
f895af0989 fuzz: Remove OSS-Fuzz timeout option
Custom timeouts aren't fully supported on OSS-Fuzz.
2024-05-14 16:08:37 +02:00
Nick Wellnhofer
ec2f68f164 parser: Report malloc failure in xmlNewInputFromFile 2024-05-14 16:04:56 +02:00
Nick Wellnhofer
8d215ac5cc xpath: Fix quadratic runtime accounting 2024-05-14 15:55:18 +02:00
Nick Wellnhofer
592546267f threads: Deprecate remaining ThrDef functions 2024-05-14 15:44:50 +02:00
Nick Wellnhofer
b117a912b6 fuzz: Enable xmllint fuzzer on OSS-Fuzz 2024-05-13 13:42:43 +02:00
Nick Wellnhofer
0651ad667c valid: Report malloc failure after xmlRegExecPushString 2024-05-13 13:08:14 +02:00
Nick Wellnhofer
609d2666fa Stop defining _REENTRANT
This macro is obsolete, see `man feature_test_macros`.
2024-05-13 13:08:14 +02:00
Nick Wellnhofer
b3cb41be8b fuzz: Add xmllint fuzzer 2024-05-13 12:50:08 +02:00
Nick Wellnhofer
16fb1028a2 reader: Fix error reporting with walker
Abort earlier in xmlTextReaderRead if an error was raised.
2024-05-13 12:50:08 +02:00
Nick Wellnhofer
a846719b9c pattern: Fix memory leak xmlCompileStepPattern 2024-05-13 12:50:08 +02:00
Nick Wellnhofer
4ff2dccf9f SAX2: Warn if URI resolution failed 2024-05-13 12:50:08 +02:00
Nick Wellnhofer
4fe116ebd3 parser: Don't report error on invalid URI
Only fragment identifiers are an error.

This removes the last user of xmlErrMsg*. Now every error reported by
the parser should result in one of ctxt->wellFormed, ctxt->nsWellFormed
or ctxt->valid being set to zero.
2024-05-13 12:50:08 +02:00
Nick Wellnhofer
3dea98eff9 xmllint: Don't free DTD with --dropdtd
Entity references point to entities in the DTD, so only unlink the DTD
and don't destroy it.
2024-05-13 12:50:08 +02:00
Nick Wellnhofer
3ad7f81624 [CVE-2024-34459] Fix buffer overread with xmllint --htmlout
Add a missing bounds check.

Fixes #720.
2024-05-13 12:50:08 +02:00
Nick Wellnhofer
c83147bff2 xmllint: Fix --pedantic option
Regressed in 74c84a8c.
2024-05-13 12:50:08 +02:00
Nick Wellnhofer
3665d667f6 xmllint: Clean up option handling
Remove unnecessary globals and make some local.

Remove unnecessary calls to xmlTextReaderSetParserProp.

Remove unused "oldout" code.

Fix skipArgs.
2024-05-13 12:50:08 +02:00
Nick Wellnhofer
f8ff4d8688 xmllint: Rework parsing
Merge a few code paths, making options like --valid or --htmlout work
with some other options.

Improve error handling.
2024-05-07 17:11:18 +02:00
Nick Wellnhofer
0bef170486 c14n: Fix memory leak after malloc failure 2024-05-07 17:11:18 +02:00
Nick Wellnhofer
5bfaab77f6 fuzz: Fix reader fuzzer 2024-05-07 17:11:18 +02:00
Nick Wellnhofer
72e9267c32 html: Fix memory leak after malloc failure 2024-05-06 17:40:15 +02:00
Nick Wellnhofer
3afaff7e8e xmllint: Check for NULL input in xmlHTMLValidityError
`ctxt->input` can be NULL after commit 61b4c42f.
2024-05-06 17:36:17 +02:00
Nick Wellnhofer
ef6e6012e2 xmllint: Fix parsing of maxmem option
Fix corner cases like 'xmllint --encode --maxmem 123'.

Also fixes --path without LIBXML_VALID_ENABLED.
2024-05-06 17:36:15 +02:00
Nick Wellnhofer
907a5a4885 xmllint: Fix memory leak in walkDoc 2024-05-06 17:35:26 +02:00