|
30be984a
|
2024-06-28T20:37:47
|
|
encoding: Rework ISO-8859-X conversion
Optimize code. Pass tables as context parameter. Check for
XML_ENC_ERR_SPACE.
|
|
b8903b9e
|
2024-06-22T17:55:46
|
|
runtest: Remove result handling from schemasOneTest
We only care about errors.
|
|
a4703785
|
2024-06-22T17:49:14
|
|
runtest: Remove result handling from rngOneTest
We only care about errors.
|
|
e68ccfa9
|
2024-06-22T16:42:36
|
|
tests: Port Schematron tests to C
|
|
84a4f84c
|
2024-06-22T02:11:24
|
|
build: Don't check for required headers and functions
Unless we are on Windows, the following POSIX headers are required.
They're part of the earliest POSIX specs and it doesn't make sense to
check for them.
- fcntl.h
- unistd.h
- sys/stat.h
- sys/time.h
On Windows, io.h, fcntl.h and sys/stat.h are always available.
|
|
2def7b4b
|
2024-06-18T13:55:34
|
|
clang-tidy: move assignments out of if
Found with bugprone-assignment-in-if-condition
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
481fd6bb
|
2024-06-16T16:30:54
|
|
tests: Remove testThreads.c
This was merged into runtest.c some time ago.
|
|
10d60d15
|
2024-06-16T00:04:46
|
|
regexp: Stop using LIBXML_AUTOMATA_ENABLED
This macro always equals LIBXML_REGEXP_ENABLED.
|
|
52d9d768
|
2024-06-15T16:20:04
|
|
runtest: move catalog.h out of threads define.
It's needed when threads are disabled.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
6ed39a82
|
2024-06-15T19:37:27
|
|
runtest: Allow catalogs
It's enough to disable the system catalog to avoid unwanted allocations.
|
|
712a31ab
|
2024-06-10T23:06:13
|
|
parser: Deprecate most public struct members
This will probably cause many warnings in downstream code abusing
libxml2 internals, but we can always undeprecate some members later.
|
|
669bd349
|
2024-06-12T18:20:01
|
|
xpointer: Remove support for XPointer locations
The latest spec for what it essentially an XPath extension seems to be
this working draft from 2002:
https://www.w3.org/TR/xptr-xpointer/
The xpointer() scheme is listed as "being reviewed" in the XPointer
registry since at least 2006. libxml2 seems to be the only modern
software that tries to implement this spec, but the code has many bugs
and quality issues.
If you configure --with-legacy, old symbols are retained for ABI
compatibility.
|
|
89743f8b
|
2024-06-11T11:34:48
|
|
test: Disable catalogs with xmlCatalogSetDefaults
Disable catalogs instead of tracking catalog allocations, simplifying
memory leak detection.
Also stop using xmlNoNetExternalEntityLoader.
|
|
afe8f845
|
2024-06-07T00:01:16
|
|
runtest: Work around broken EUC-JP support in musl iconv
Should fix #728.
|
|
02cbb2b6
|
2024-06-06T23:09:17
|
|
runtest: Suppress undeclared entity errors
|
|
0d0cb4c2
|
2024-06-06T23:07:16
|
|
runtest: Check for IBM-1141 encoding handler
Should fix #729.
|
|
fdc5ff36
|
2024-05-02T16:23:04
|
|
parser: Always throw entity errors if external DTD is loaded
When parsing with XML_PARSE_DTDLOAD, missing entities are always an
error.
Also consolidate behavior when validating. See b717abdd.
|
|
b717abdd
|
2024-04-22T15:42:39
|
|
parser: Consolidate error handling for undeclared entities
Always use XML_WAR_UNDECLARED_ENTITY with warning error level in
documents with external subset or parameter entities. Use
XML_ERR_UNDECLARED_ENTITY otherwise.
|
|
65c65b65
|
2024-01-04T13:59:23
|
|
tests: Move away from global error handlers
|
|
07c05546
|
2024-01-04T02:48:02
|
|
error: Make xmlFormatError public
This is a useful function to get a verbose error report.
Allows to remove duplicated code from runtest.c. Also reactivate check
for schema parser failures.
|
|
8ab1b122
|
2023-12-23T00:00:15
|
|
Fix filename and URI handling
Many strings are passed to the library that could be either URIs or
filesystem paths. We now assume that strings are a URI if they contain
the substring "://". This means that they have a scheme and an
authority. Otherwise, URI resolution wouldn't make much sense.
Fix xmlBuildURI to work with filesystem paths. If the base URI doesn't
contain "://" it is treated as filename. The resolved URI is unescaped,
appended and the result is normalized. Rewrite xmlNormalizePath to
handle Windows quirks.
All special handling for Windows paths is removed in xmlCanonicPath.
If the path looks like an URI, only escape characters allowed in Legacy
Extended IRIs.
Make xmlPathToURI only call xmlCanonicPath. Theh additional round-trip
through URI parser and serializer seems useless.
Add a helper function xmlConvertUriToPath in xmlIO.c which checks for
file URIs and unescapes them.
Always process strings with xmlCanonicPath in xmlLoadExternalEntity.
This should be harmless now.
Should help with #334, #387, #611.
|
|
882b3a80
|
2023-12-21T15:34:24
|
|
runtest: Fix return code in rngTest
|
|
8d0aaf4b
|
2023-12-19T20:47:36
|
|
parser: Remove xmlErrEncoding
Use xmlFatalErr or xmlCtxtErrIO.
|
|
e9c01c30
|
2023-12-18T21:41:30
|
|
runtest: Test with per-context error handlers
Only set the global error handler where needed.
Don't use xmlGenericError.
|
|
157df344
|
2023-12-10T18:23:53
|
|
xmlreader: Report malloc failures
Fix many places where malloc failures aren't reported.
Introduce a new API function xmlTextReaderGetLastError.
|
|
f3455ecd
|
2023-12-10T15:46:53
|
|
error: Report malloc failures
Don't ignore malloc failures in xmlRaiseError and xmlCopyError.
Don't print filename if context has no input.
Introduce xmlVRaiseError taking a va_list.
|
|
e3959461
|
2023-11-30T16:15:46
|
|
html: Reenable buggy detection of XML declarations
Switch to UTF-8 if a document starts with '<?xm' to match old behavior.
Also enable this check in the push parser.
Fixes #637.
|
|
455c61d6
|
2023-11-23T15:59:41
|
|
Remove VMS support
This was last updated 10 years ago and is most likely broken.
|
|
f92ea2cc
|
2023-11-18T14:36:41
|
|
tests: Fix build with older MSVC
Regressed in 9b5cce7a.
Fixes #620.
|
|
61034116
|
2023-10-24T15:02:36
|
|
error: Make more xmlError structs constant
Prepare for future changes, see 45470611.
|
|
253f260b
|
2023-10-18T20:06:35
|
|
threads: Fix --with-thread-alloc
Fixes #606.
|
|
6337a14a
|
2023-10-06T10:44:38
|
|
tests: Handle entities in SAX tests
|
|
da274bfa
|
2023-09-21T01:29:40
|
|
build: Fix build when certain modules are disabled
|
|
9b5cce7a
|
2023-09-21T00:44:50
|
|
include: Remove more unnecessary includes
|
|
699299ca
|
2023-09-20T18:54:39
|
|
globals: Stop including globals.h
|
|
209516ac
|
2023-09-20T15:49:03
|
|
tests: Don't use deprecated symbols
|
|
c3c6cc62
|
2023-05-24T20:08:33
|
|
runtest: Fix compilation without LIBXML_HTML_ENABLED
Fixes #545.
|
|
4f49017e
|
2023-04-30T21:26:55
|
|
tests: Test streaming schema validation
|
|
0ffc2d82
|
2023-04-30T20:28:47
|
|
runtest: Skip element name in schema error messages
This makes sure that memory and streaming tests will report the same
messages.
|
|
886bf4e6
|
2023-04-30T15:35:47
|
|
Stop calling xmlMemoryDump
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.
|
|
dd3569ea
|
2022-12-08T02:43:17
|
|
Remove XMLDECL macro from .c files
|
|
76c6da42
|
2022-12-04T23:01:00
|
|
error: Make sure that error messages are valid UTF-8
This has caused issues with the Python bindings for a long time.
Should fix #64.
|
|
05c3a458
|
2022-11-25T14:15:43
|
|
tests: Check that xmlInitParser doesn't allocate memory
|
|
34a5a4a5
|
2022-11-22T15:40:51
|
|
tests: Remove unneeded #includes
|
|
9c63cea5
|
2022-11-20T15:36:41
|
|
test: Add test for push parser boundaries
|
|
ea7c9fb5
|
2022-10-22T16:48:58
|
|
xinclude: Don't create result doc for test with errors
|
|
c99cde3f
|
2022-10-22T16:59:35
|
|
xinclude: Also test error messages
The reader interface with XIncludes is somewhat broken and can generate
different error messages. Start to move tests which are sketchy with
reader to a separate directory.
|
|
a9669679
|
2022-09-09T01:44:00
|
|
error: Don't use initGenericErrorDefaultFunc
The code in xmlInitParser did only set the error handler if it was NULL
which should never happen.
|
|
13a66378
|
2022-09-04T01:05:51
|
|
Remove BeOS support
Haiku shouldn't be affected.
|
|
caef8563
|
2022-09-02T17:26:47
|
|
Move automata test to runtest.c
|
|
5bffa33a
|
2022-09-02T05:03:03
|
|
Stop including sys/types.h
|
|
a308c0cd
|
2022-08-25T20:18:16
|
|
Deprecate old HTML SAX API
|
|
c61e1273
|
2022-04-21T06:03:22
|
|
Fix warnings when testing --with-minimum build
There's no simple way to make the doc/examples tests handle different
configurations. But these tests aren't especially valuable, so remove
the result file checks.
|
|
4612ce30
|
2022-04-21T03:52:52
|
|
Implement xpath1() XPointer scheme
See https://www.w3.org/2005/04/xpointer-schemes/
|
|
67070107
|
2022-04-20T23:17:14
|
|
Add configuration flag for XPointer locations support
Add a new configuration flag that controls whether the outdated support
for XPointer locations (ranges and points) is enabled.
--with-xptr-locs # Autotools
LIBXML2_WITH_XPTR_LOCS # CMake
The latest spec for what it essentially an XPath extension seems to be
this working draft from 2002:
https://www.w3.org/TR/xptr-xpointer/
The xpointer() scheme is listed as "being reviewed" in the XPointer
registry since at least 2006. libxml2 seems to be the only modern
software that tries to implement this spec, but the code has many bugs
and quality issues.
The flag defaults to "off" and support for this extensions has to be
requested explicitly. The relevant API functions are deprecated.
|
|
7204dbb0
|
2022-04-13T16:51:49
|
|
Don't mix declarations and code in runtest.c
|
|
48f191e7
|
2022-04-04T03:12:49
|
|
Fix schemas and relaxng tests
Run all tests in runtest.c with warnings. This is required to match the
schema validation output from xmllint and doesn't seem to cause any
problems.
Fix the .xml file pattern.
Check parser errors. Print xmllint message if Relax-NG schema can't be
parsed.
|
|
5ce893c0
|
2020-07-09T03:21:07
|
|
Move regexp tests to runtest
|
|
f1c32b4c
|
2020-07-09T03:19:13
|
|
Allow missing result files in runtest
Treat missing files as empty.
|
|
95c7f315
|
2022-04-03T21:39:14
|
|
Move SVG tests to runtest.c
Also update the test results for the first time since 2000.
|
|
865520f0
|
2022-03-30T00:32:35
|
|
Respect `--sysconfdir` in source files
* Prefix installations need to point to a non-root `etc`
- Gentoo Prefix has been patching this for over 10 years:
https://bugs.gentoo.org/317891
- MacPorts has to manually replace paths after patching:
https://github.com/macports/macports-ports/blob/cc3bb736e906abe73b014da02a89ae2b70ef6295/textproc/libxml2/Portfile#L46
|
|
2489c1d0
|
2022-02-28T22:42:10
|
|
Remove useless __CYGWIN__ checks
From what I can tell, some really early Cygwin versions from around
1998-2000 used to erroneously define _WIN32. This was eventually fixed,
but these days, the `defined(_WIN32) && !defined(__CYGWIN__)` idiom is
unnecessary.
Now, we only check for __CYGWIN__ in xmlexports.h when deciding whether
to use __declspec.
|
|
b057239b
|
2022-02-22T11:52:38
|
|
More fixes to --without-valid build
Fix runtest and Python bindings when building --without-valid.
The Python tests still fail. There doesn't seem to be a mechanism to
disable tests depending on feature flags.
|
|
21217dd9
|
2022-01-25T02:34:40
|
|
Add explicit casts in runtest.c
Avoids integer conversion warnings with UBSan.
|
|
87a99270
|
2021-08-26T11:50:41
|
|
Added regression tests for xmlReadFd() and htmlReadFd()
|
|
e1c2d0ad
|
2020-08-16T22:22:57
|
|
Fix memory leak in runtest.c
|
|
e6ba4bd7
|
2020-06-04T11:58:04
|
|
Add command line option for temp directory in runtest
|
|
f20daa9e
|
2020-02-11T13:13:52
|
|
Enable error tests with entity substitution
|
|
1fda3248
|
2019-10-14T16:48:32
|
|
Fix exponent digits when running tests under old MSVC
Switch printf output format to two-digit exponent under certain MSVC
versions.
Closes #111.
|
|
2a350ee9
|
2019-09-30T17:04:54
|
|
Large batch of typo fixes
Closes #109.
|
|
6c91dd94
|
2019-08-01T15:01:47
|
|
Don't call printf with NULL string in runtest.c
Avoids undefined behavior causing problems on HP-UX and Solaris.
Closes #78.
|
|
dcae579e
|
2019-01-01T16:48:40
|
|
Remove unneeded function pointer casts
|
|
8919885f
|
2019-01-01T16:30:38
|
|
Fix -Wformat-truncation warnings (GCC 8)
|
|
dc6d2a49
|
2018-09-04T17:13:29
|
|
Don't run icu_parse_test if EUC-JP is unsupported
Closes: #25
|
|
4b413597
|
2017-10-31T17:17:16
|
|
Skip EBCDIC tests if EBCDIC isn't supported
Fixes bug 603432.
|
|
cf820462
|
2017-10-21T14:43:00
|
|
Rework handling of return values in thread tests
Pass a struct to each thread that contains the filename and the return
value. This avoids casting a DWORD to a pointer on Windows.
|
|
82e0394d
|
2017-10-09T02:05:41
|
|
Fix runtest on Windows
Unbuffer the output and fix some compiler warnings.
|
|
e3890546
|
2017-10-09T00:20:01
|
|
Fix the Windows header mess
Don't include windows.h and wsockcompat.h from config.h but only when
needed.
Don't define _WINSOCKAPI_ manually. This was apparently done to stop
windows.h from including winsock.h which is a problem if winsock2.h
wasn't included first. But on MinGW, this causes compiler warnings.
Define WIN32_LEAN_AND_MEAN instead which has the same effect.
Always use the compiler-defined _WIN32 macro instead of WIN32.
|
|
81c01ee9
|
2017-06-17T14:12:53
|
|
Fix unused-parameter warnings
|
|
dbaab1f3
|
2017-06-16T21:38:57
|
|
Test SAX2 callbacks with entity substitution
This detects regressions like bug 760367.
|
|
01a4b81a
|
2017-06-16T21:27:47
|
|
Support catalog and threads tests under --without-sax1
|
|
85c112a0
|
2017-06-12T18:26:11
|
|
Add test cases for bug 758518
test/HTML/758518-entity.html exposed a bug in pushParseTest() in
runtest.c which assumed that an input file was at least 4 bytes long.
That test case is only 3 bytes, so we now take the minimum of 4 bytes
or the length of the test input. We also now use 'chunkSize' in place
of the hard-coded value '1024' later in the function.
|
|
e2663054
|
2017-06-05T15:37:17
|
|
Fix handling of parameter-entity references
There were two bugs where parameter-entity references could lead to an
unexpected change of the input buffer in xmlParseNameComplex and
xmlDictLookup being called with an invalid pointer.
Percent sign in DTD Names
=========================
The NEXTL macro used to call xmlParserHandlePEReference. When parsing
"complex" names inside the DTD, this could result in entity expansion
which created a new input buffer. The fix is to simply remove the call
to xmlParserHandlePEReference from the NEXTL macro. This is safe because
no users of the macro require expansion of parameter entities.
- xmlParseNameComplex
- xmlParseNCNameComplex
- xmlParseNmtoken
The percent sign is not allowed in names, which are grammatical tokens.
- xmlParseEntityValue
Parameter-entity references in entity values are expanded but this
happens in a separate step in this function.
- xmlParseSystemLiteral
Parameter-entity references are ignored in the system literal.
- xmlParseAttValueComplex
- xmlParseCharDataComplex
- xmlParseCommentComplex
- xmlParsePI
- xmlParseCDSect
Parameter-entity references are ignored outside the DTD.
- xmlLoadEntityContent
This function is only called from xmlStringLenDecodeEntities and
entities are replaced in a separate step immediately after the function
call.
This bug could also be triggered with an internal subset and double
entity expansion.
This fixes bug 766956 initially reported by Wei Lei and independently by
Chromium's ClusterFuzz, Hanno Böck, and Marco Grassi. Thanks to everyone
involved.
xmlParseNameComplex with XML_PARSE_OLD10
========================================
When parsing Names inside an expanded parameter entity with the
XML_PARSE_OLD10 option, xmlParseNameComplex would call xmlGROW via the
GROW macro if the input buffer was exhausted. At the end of the
parameter entity's replacement text, this function would then call
xmlPopInput which invalidated the input buffer.
There should be no need to invoke GROW in this situation because the
buffer is grown periodically every XML_PARSER_CHUNK_SIZE characters and,
at least for UTF-8, in xmlCurrentChar. This also matches the code path
executed when XML_PARSE_OLD10 is not set.
This fixes bugs 781205 (CVE-2017-9049) and 781361 (CVE-2017-9050).
Thanks to Marcel Böhme and Thuan Pham for the report.
Additional hardening
====================
A separate check was added in xmlParseNameComplex to validate the
buffer size.
|
|
c2545cbb
|
2016-08-22T11:44:18
|
|
Fix format string warnings
Also fixes bug #768199:
https://bugzilla.gnome.org/show_bug.cgi?id=768199
|
|
1fc55ca7
|
2016-06-25T12:35:09
|
|
Don't print generic error messages in XPath tests
|
|
a820dbea
|
2016-03-01T11:34:04
|
|
Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605>
Reviewed by David Kilzer.
* HTMLparser.c:
(htmlParseName): Add bounds check.
(htmlParseNameComplex): Ditto.
* result/HTML/758605.html: Added.
* result/HTML/758605.html.err: Added.
* result/HTML/758605.html.sax: Added.
* runtest.c:
(pushParseTest): The input for the new test case was so small
(4 bytes) that htmlParseChunk() was never called after
htmlCreatePushParserCtxt(), thereby creating a false positive
test failure. Fixed by using a do-while loop so we always call
htmlParseChunk() at least once.
* test/HTML/758605.html: Added.
|
|
9f2416c6
|
2016-05-22T11:14:45
|
|
Add more debugging info to runtest
When there is a failure, indicates what failed instead of just
dumping the tested file name.
|
|
5c37382f
|
2016-05-22T09:58:30
|
|
Implement "runtest -u" mode
For https://bugzilla.gnome.org/show_bug.cgi?id=611807
Using "make tests" to add new tests is error prone.
This patch implements a "runtest -u" mode that makes it much
easier to create baselines for new tests.
|
|
5777ae75
|
2014-06-20T21:15:16
|
|
runtest: Fix a memory leak on parse failure
Coverity issue: #60439
https://bugzilla.gnome.org/show_bug.cgi?id=731990
|
|
a7982ce2
|
2012-10-25T15:39:39
|
|
Adding streaming validation to runtest checks
|
|
ff7227f2
|
2012-08-20T20:58:24
|
|
Patch for portability of latin characters in C files
Coming from LibreOffice repository:
http://cgit.freedesktop.org/libreoffice/core/plain/libxml2/libxml2-latin.patch
|
|
c3b1d09b
|
2012-08-13T16:50:48
|
|
clean redefinition of {v}snprintf in C-source
as those from *config.h are preferable (e.g. win32config.h)
|
|
1f0453f7
|
2012-08-13T16:56:11
|
|
minimize use of HAVE_CONFIG_H
as build process for supported platforms provide "config.h" header file
|
|
495a73df
|
2012-08-07T10:14:56
|
|
fix runtests to use pthreads support for various Unix platforms
The runtests program currently fails with
Specific platform thread support not detected
on HP-UX, AIX and other Unix systems which do not match the conditional
#if defined(linux) || defined(__sun) || defined(__APPLE_CC__)
It is silly to try to enumerate all systems which use pthreads in a conditional
like this. I am attaching a patch (against git master) that rewrites the cpp
conditional structure so that pthreads is used if HAVE_PTHREAD_H is defined,
and moves that section of code down below the Win32 and BeOS cases so that
native thread libraries are used preferentially in those two cases.
|
|
22030ef8
|
2012-05-23T15:52:45
|
|
Restore code for Windows compilation
Try to keep as close to rc1 but still allow the change from Roumen for
mingw
|
|
978ff224
|
2012-05-20T16:07:54
|
|
use mingw C99 compatible functions {v}snprintf instead those from MSVC runtime
|
|
c9667907
|
2010-01-22T08:24:25
|
|
Fix relaxNG tests in runtest for Windows
* runtest.c: initialize ret
|
|
594e5dfb
|
2009-09-07T14:58:47
|
|
Chasing dead assignments reported by clang-scan
* SAX2.c dict.c error.c hash.c nanohttp.c parser.c python/libxml.c
relaxng.c runtest.c tree.c valid.c xinclude.c xmlregexp.c xmlsave.c
xmlschemas.c xpath.c xpointer.c: mostly removing unneded affectations,
but this led to a few real bugs and some part not yet understood
(relaxng/interleave)
|
|
13cee4e3
|
2009-09-05T14:52:55
|
|
Fix a bunch of scan 'dead increments' and cleanup
* HTMLparser.c c14n.c debugXML.c entities.c nanohttp.c parser.c
testC14N.c uri.c xmlcatalog.c xmllint.c xmlregexp.c xpath.c:
fix unused variables, or unneeded increments as well as a couple
of space issues
* runtest.c: check for NULL before calling unlink()
|
|
ec18c960
|
2009-08-26T18:37:43
|
|
558452 fight with reg test and error report
* relaxng.c: tiny fix and provide more context on some errors
* result/relaxng/558452_0* test/relaxng/558452*: add some regression
tests for the bugs
* Makefile.am runtest.c: fight with the fact streaming error messages
can differ due to missing node context
|