Commit graph

4316 commits

Author SHA1 Message Date
Sebastian Pipping
a39eb0ea8f
Merge pull request #937 from libexpat/issue-935-autotools-fix-generated-cmake-files-for-macos
Make Autotools-generated CMake files look for `libexpat.@SO_MAJOR@.dylib` (fixes #935)
2024-12-17 21:04:53 +01:00
Sebastian Pipping
b791ba36d6 Make Autotools-generated CMake files look for libexpat.@SO_MAJOR@.dylib
.. to match what Autotools is producing in reality at build time.
Unlike CMake, Autotools does not produce file
"libexpat.@SO_MAJOR@.@SO_MINOR@.@SO_PATCH@.dylib" when compiling on macOS.

What the commit does on the CI side is closely mimicking a similar thing
with MinGW that existed until 7731dd5b90621a9e4696d1c467bca2b6ece6e3e6^ .
2024-12-17 19:31:13 +01:00
Sebastian Pipping
8cb7d56772
Merge pull request #933 from libexpat/tests-cover-start-tag-level-greater-one
Tests: Cover `doContent` with `startTagLevel` greater than one
2024-12-11 14:21:44 +01:00
Sebastian Pipping
de96ce5b5d tests: Cover doContent with startTagLevel >=2 2024-12-11 12:29:32 +01:00
Sebastian Pipping
422b5726e4
Merge pull request #932 from libexpat/tests-increase-coverage-unsigned-char-to-printable
Tests: Increase coverage of function `unsignedCharToPrintable`
2024-12-10 00:53:38 +01:00
Sebastian Pipping
e58a3c9645 tests: Cover case 0xff for unsignedCharToPrintable 2024-12-09 23:34:08 +01:00
Sebastian Pipping
03966546fa lib: Mark dead code in unsignedCharToPrintable as dead to LCOV 2024-12-09 23:33:57 +01:00
Sebastian Pipping
a0dc7d5efa
Merge pull request #930 from libexpat/tests-cover-indirect-entity-recursion
Tests: Cover indirect entity recursion
2024-11-26 20:14:00 +01:00
Sebastian Pipping
3d5fdbb44e tests: Cover indirect entity recursion 2024-11-26 18:29:36 +01:00
Sebastian Pipping
5fdb63c027
Merge pull request #927 from libexpat/tests-cover-doctype-closing-more
Tests: Cover doctype closing more
2024-11-23 22:34:12 +01:00
Sebastian Pipping
885f4c6303 tests: Save some runtime in test_misc_deny_internal_entity_closing_doctype_issue_317
Idea by Sebastian Andrzej Siewior
2024-11-23 15:34:49 +01:00
Sebastian Pipping
7b05b1420b tests: Make suspend_after_element_declaration check for XML_StopParser success
Idea by Sebastian Andrzej Siewior
2024-11-23 15:34:49 +01:00
Sebastian Pipping
f46a225dc4 tests: Cover doctype closing for internalEntityProcessor through suspension 2024-11-23 15:34:43 +01:00
Sebastian Pipping
326de3dca0
Merge pull request #926 from libexpat/tests-reject-single-bytes-with-suspension
Tests: Reject combining single-bytes approach with suspension
2024-11-23 14:54:30 +01:00
Sebastian Pipping
31cb5b01fa tests: Protect against accidental misuse of single-bytes approach
Please see commit 60dffa148c
("tests: Use normal XML_Parse in test_suspend_resume_internal_entity")
for more details on the related issue.

In reaction to analysis by Berkay Eren Ürün.
2024-11-23 12:50:55 +01:00
Sebastian Pipping
c33ff57a51 tests: Save runtime on tests that do not use the single-bytes approach
Related tests are:
- test_reset_in_entity
- test_resume_entity_with_syntax_error
- test_suspend_parser_between_cdata_calls
2024-11-23 12:50:55 +01:00
Sebastian Pipping
35ec6e65d6 tests: Fix multiple places that combined single-bytes with suspension
Please see commit 60dffa148c
("tests: Use normal XML_Parse in test_suspend_resume_internal_entity")
for more details on the related issue.

Related tests are:
- test_repeated_stop_parser_between_char_data_calls
- test_reset_in_entity
- test_resume_entity_with_syntax_error
- test_suspend_parser_between_cdata_calls
- test_suspend_parser_between_char_data_calls
- test_suspend_xdecl

In reaction to a finding by Berkay Eren Ürün.
2024-11-23 12:50:55 +01:00
Sebastian Pipping
4e2348a823
Merge pull request #925 from libexpat/autotools-sync-cmake-files
autotools: Sync CMake templates with CMake 3.29
2024-11-16 01:04:06 +01:00
Sebastian Pipping
3d317c9564 autotools: Sync CMake templates with CMake 3.29 2024-11-15 23:20:19 +01:00
Sebastian Pipping
554edf4d57
Merge pull request #921 from libexpat/document-stopparser-error
doc: Add missing documentation of error `XML_ERROR_NOT_STARTED` (follow-up to #915)
2024-11-10 00:07:45 +01:00
Sebastian Pipping
9d17a3a073 doc: Add missing documentation of error XML_ERROR_NOT_STARTED 2024-11-09 19:20:58 +01:00
Sebastian Pipping
2691aff430
Merge pull request #920 from libexpat/issue-919-prepare-release
Prepare release 2.6.4 (part of #919, ETA 2024-11-xx)
2024-11-07 02:31:34 +01:00
Sebastian Pipping
750c985f11 Sync file headers 2024-11-06 17:42:20 +01:00
Sebastian Pipping
69beb743e1 .mailmap: Extend mailmap for @hannob's second address 2024-11-06 17:42:20 +01:00
Sebastian Pipping
b5b5031516 Set release date for 2.6.4 2024-11-06 17:42:20 +01:00
Sebastian Pipping
c15ac3b307 Bump version to 2.6.4 2024-11-06 17:42:20 +01:00
Sebastian Pipping
ad7b7cbe6b Bump version info from 10:3:9 to 11:0:10
See https://verbump.de/ for what these numbers do
2024-11-06 17:42:20 +01:00
Sebastian Pipping
a5725d8207 Changes: Document changes in release Expat 2.6.4 2024-11-06 17:42:20 +01:00
Sebastian Pipping
4bbbfad6aa
Merge pull request #918 from libexpat/issue-317-improve-tests
Improve tests for #317 (follow-up to #318)
2024-11-06 16:37:21 +01:00
clang-format 19.1.2
e971e2ed1a tests: Re-format test_misc_deny_internal_entity_closing_doctype_issue_317 2024-11-05 00:32:29 +01:00
Sebastian Pipping
20580a4550 tests: Improve test_misc_deny_internal_entity_closing_doctype_issue_317 case 3
"%e;" resolves to "]><d" which needs additional "/>" to make the
wanted "]><d/>", eventually.
2024-11-05 00:31:38 +01:00
Sebastian Pipping
80c2512d71 tests: Fix test_misc_deny_internal_entity_closing_doctype_issue_317 case 2
"&#37;e1;" resolves to "%e1;" which resolves to "]><d/>".
Now with c20b758c33 reverted, test case
"inputTwo" has an actual chance of being a false positive parse.
2024-11-05 00:19:00 +01:00
Sebastian Pipping
ef485e96a6
Merge pull request #915 from libexpat/stop-resumeparser-from-crashing
[CVE-2024-50602] Stop `XML_ResumeParser` from crashing
2024-10-28 15:14:02 +01:00
Sebastian Pipping
a190a98da2
Merge pull request #917 from libexpat/dependabot/github_actions/actions/checkout-4.2.2
Actions(deps): Bump actions/checkout from 4.2.1 to 4.2.2
2024-10-28 15:05:20 +01:00
dependabot[bot]
8662086834
Actions(deps): Bump actions/checkout from 4.2.1 to 4.2.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](eef61447b9...11bd71901b)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 12:39:04 +00:00
Sebastian Pipping
cba3e03bbc
Merge pull request #914 from hannob/fixformatsign
Fix signedness of format strings
2024-10-23 17:44:39 +02:00
Hanno Böck
d827287012 Cast enum vars to unsigned int if used in printf
It is not specified by the C standard whether enum is unsigned,
therefore, make sure it is always unsigned if we print it as a
number.
2024-10-23 17:02:31 +02:00
Sebastian Pipping
b3836ff534 tests: Cover XML_StopParser's new handling of status XML_INITIALIZED
Prior to the fix to XML_StopParser, test test_misc_resumeparser_not_crashing
would crash with a NULL pointer dereference in function normal_updatePosition.
This was the AddressSanitizer output:

> AddressSanitizer:DEADLYSIGNAL
> =================================================================
> ==19700==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x5623e07ad85f bp 0x7ffcf40da650 sp 0x7ffcf40da590 T0)
> ==19700==The signal is caused by a READ memory access.
> ==19700==Hint: address points to the zero page.
>     #0 0x5623e07ad85f in normal_updatePosition [..]/lib/xmltok_impl.c:1781:13
>     #1 0x5623e07a52ff in initUpdatePosition [..]/lib/xmltok.c:1031:3
>     #2 0x5623e0762760 in XML_ResumeParser [..]/lib/xmlparse.c:2297:3
>     #3 0x5623e074f7c1 in test_misc_resumeparser_not_crashing() misc_tests_cxx.cpp
>     #4 0x5623e074e228 in srunner_run_all ([..]/build_asan_fuzzers/tests/runtests_cxx+0x136228)
>     #5 0x5623e0753d2d in main ([..]/build_asan_fuzzers/tests/runtests_cxx+0x13bd2d)
>     #6 0x7f802a39af79  (/lib64/libc.so.6+0x25f79)
>     #7 0x7f802a39b034 in __libc_start_main (/lib64/libc.so.6+0x26034)
>     #8 0x5623e064f340 in _start ([..]/build_asan_fuzzers/tests/runtests_cxx+0x37340)
>
> AddressSanitizer can not provide additional info.
> SUMMARY: AddressSanitizer: SEGV [..]/lib/xmltok_impl.c:1781:13 in normal_updatePosition
> ==19700==ABORTING

And this the UndefinedBehaviorSanitizer output:

> [..]/lib/xmltok_impl.c:1781:13: runtime error: load of null pointer of type 'const char'
> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior [..]/lib/xmltok_impl.c:1781:13 in
2024-10-21 18:27:46 +02:00
Sebastian Pipping
5fb89e7b3a lib: Be explicit about XML_PARSING in XML_StopParser 2024-10-21 18:27:46 +02:00
Sebastian Pipping
51c7019069 lib: Make XML_StopParser refuse to stop/suspend an unstarted parser 2024-10-21 18:27:46 +02:00
Hanno Böck
424dd12400 Fix signedness of format strings
Format strings used %d to print variables with unsigned values.
Changing to %u to match signedness.
Fixes "clang -Wformat-signedness" warnings.
2024-10-20 08:45:59 +02:00
Sebastian Pipping
b70c8f5e51
Merge pull request #913 from libexpat/migrate-off-of-soon-gone-macos-12
`macos.yml`: Drop `macos-12` and add `macos-15`
2024-10-18 20:16:44 +02:00
Sebastian Pipping
0467264cca
Merge pull request #911 from libexpat/dependabot/github_actions/actions/checkout-4.2.1
Actions(deps): Bump actions/checkout from 4.2.0 to 4.2.1
2024-10-17 00:20:30 +02:00
Sebastian Pipping
c2905a6ea9 macos.yml: Drop macos-12 and add macos-15 2024-10-16 23:49:26 +02:00
Sebastian Pipping
efa6739d82
Merge pull request #912 from libexpat/dependabot/github_actions/actions/upload-artifact-4.4.3
Actions(deps): Bump actions/upload-artifact from 4.4.0 to 4.4.3
2024-10-15 00:42:53 +02:00
dependabot[bot]
4345924eca
Actions(deps): Bump actions/upload-artifact from 4.4.0 to 4.4.3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.4.0 to 4.4.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](50769540e7...b4b15b8c7c)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-14 12:47:05 +00:00
dependabot[bot]
e619744a58
Actions(deps): Bump actions/checkout from 4.2.0 to 4.2.1
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](d632683dd7...eef61447b9)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-14 12:47:01 +00:00
Sebastian Pipping
776417e726
Merge pull request #910 from libexpat/fix-ci
Fix CI / `linux.yml`: Fix mishandling of package `debsuryorg-archive-keyring`
2024-10-12 22:46:35 +02:00
Sebastian Pipping
996db2d204 linux.yml: Fix mishandling of package debsuryorg-archive-keyring
There is no package debsuryorg-archive-keyring in Ubuntu focal, so it has
to be excluded from the list of packages that are reverted back to Ubuntu
focal.

Symptom was:
> # sudo apt-get install --yes --no-install-recommends --allow-downgrades -V \
>     debsuryorg-archive-keyring/focal libgd3:amd64/focal libhashkit2:amd64/focal \
>     libmemcached11:amd64/focal libpcre2-16-0:amd64/focal libpcre2-32-0:amd64/focal \
>     libpcre2-8-0:amd64/focal
> Reading package lists...
> Building dependency tree...
> Reading state information...
> E: Release 'focal' for 'debsuryorg-archive-keyring' was not found
2024-10-12 21:27:18 +02:00
Sebastian Pipping
feed801167
Merge pull request #907 from libexpat/ci-clang-19
CI: Upgrade to Clang 19
2024-10-08 23:31:19 +02:00