Commit graph

3651 commits

Author SHA1 Message Date
Sebastian Pipping
9d26eda6f8 lib: Simplify control flow in internalEntityProcessor
The key is that all branches but the last ended in `return`.

```
BEFORE              |   AFTER
--------------------+--------------------
if (..a..) {        | if (..a..) {
    ..b..;          |     ..b..;
    return ..c..;   |     return ..c..;
                    | }
} else if (..d..) { | if (..d..) {
    ..e..;          |     ..e..;
    return ..f..;   |     return ..f..;
} else {            | }
    ..g..;          | ..g..;
}                   |
```
2022-10-17 23:11:10 +02:00
Sebastian Pipping
15026eb853
Merge pull request #653 from libexpat/issue-652-stop-leaking-tag-bindings
Stop leaking tag bindings (fixes #652)
2022-10-17 22:37:30 +02:00
Sebastian Pipping
4681060290
Merge pull request #659 from libexpat/dependabot/github_actions/actions/checkout-3.1.0
Actions(deps): Bump actions/checkout from 3.0.2 to 3.1.0
2022-10-10 15:16:21 +02:00
dependabot[bot]
cfa1c20be4
Actions(deps): Bump actions/checkout from 3.0.2 to 3.1.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.0.2...v3.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 12:07:28 +00:00
Sebastian Pipping
ea4a24d764
Merge pull request #658 from Osyotr/patch-1
[2.4.9] CMake: Fix static library name when building with MinGW
2022-10-07 23:04:30 +02:00
Osyotr
90bc7cf0ab
Fix static library name when building with mingw
When building static library with mingw the output file name should be `libexpat.a`, not `libexpat-1.dll`.
This is a regression from https://github.com/libexpat/libexpat/pull/624
Original issue: https://github.com/microsoft/vcpkg/issues/27132
2022-10-07 21:56:31 +03:00
Sebastian Pipping
8510b2c551 Changes: Document #652 2022-10-07 19:30:46 +02:00
Sebastian Pipping
16a4db928b lib: Stop leaking opening tag bindings after closing tag mismatch error
.. by moving the opening tag onto the free tag list only
*after* the tag match check has passed.
2022-10-07 19:30:10 +02:00
Sebastian Pipping
d7ea13f504 tests: Cover leak of opening tag bindings after closing tag mismatch error 2022-10-07 19:30:10 +02:00
Sebastian Pipping
eb976a36d0
Merge pull request #645 from libexpat/issue-612-fix-corruption-from-undefined-entities
Fix corruption from undefined entities (fixes #612, variation of #615)
2022-10-07 19:05:30 +02:00
Osyotr
7185eee99a
[2.4.9] CMake: Fix generation of pkgconfig file (#656) 2022-10-04 02:33:13 +02:00
musvaage
c7b546595e
fix typos (#655) 2022-09-26 00:26:04 +02:00
Sebastian Pipping
fa1efbac97 Changes: Document #612 #645 2022-09-21 00:27:57 +02:00
Jann Horn
1bdbde26b9 Fix curruption from undefined entities (fixes #612) 2022-09-21 00:27:33 +02:00
Rhodri James
c697c3ed6e Regression test for #612: tempPool corrupt from attribute types.
Attribute type declarations accumulate the type in m_tempPool.
When parsing is skipped because of (for example) a missing
parameter entity, the accumulated definition is not cleared out
as it normally would be, and corrupts the data passed to future
handlers.

Note this commit leaves the regression tests failing (which is
after all what we were trying to prove).
2022-09-21 00:27:33 +02:00
Sebastian Pipping
b4eecc131f
Merge pull request #648 from libexpat/issue-648-tests-fix-warning-missing-prototypes
tests: Address GCC warning -Wmissing-prototypes
2022-09-21 00:26:19 +02:00
Sebastian Pipping
9f13b5b575 tests: Address GCC warning -Wmissing-prototypes
Symptom:
../../../tests/runtests.c:4994:1: warning: no previous prototype for ‘suspending_comment_handler’ [-Wmissing-prototypes]
 4994 | suspending_comment_handler(void *userData, const XML_Char *data) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
2022-09-20 23:19:14 +02:00
Sebastian Pipping
d77291a482
Merge pull request #644 from libexpat/issue-642-release-2-4-9
Prepare release 2.4.9 (part of #642)
2022-09-20 16:26:19 +02:00
Sebastian Pipping
869b3dea1c Set release date for version 2.4.9 2022-09-19 16:20:44 +02:00
Sebastian Pipping
a7103d40d8 Bump version to 2.4.9 2022-09-19 16:20:44 +02:00
Sebastian Pipping
88462ba0fa Bump version info from 9:8:8 to 9:9:8
See https://verbump.de/ for what these numbers do
2022-09-19 16:20:44 +02:00
Sebastian Pipping
f70d53f2f5 Changes: Document #592 #593 #594 #614 #619 #627 #633 #635 #636 #637 2022-09-19 16:20:44 +02:00
Sebastian Pipping
55b79f4d88 Sync file headers 2022-09-19 16:20:44 +02:00
Sebastian Pipping
86a4093aab Resolve use of deprecated "fgrep" by "grep -F"
Related:
https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00001.html
2022-09-19 16:19:42 +02:00
Sebastian Pipping
7430d28769 win32/build_expat_iss.bat: Add -DEXPAT_WARNINGS_AS_ERRORS=ON 2022-09-19 16:19:42 +02:00
Sebastian Pipping
be3202513b
Merge pull request #643 from libexpat/clang-15
Upgrade Clang from 14 to 15
2022-09-15 15:46:42 +02:00
Sebastian Pipping
d139637bcb Actions: Upgrade Clang from 14 to 15 2022-09-15 01:12:37 +02:00
Sebastian Pipping
d88c9510e2 tests: Address Clang 15 warning -Wstrict-prototypes
Symptom was:
error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
2022-09-15 01:12:37 +02:00
Sebastian Pipping
a976e32abd
Merge pull request #640 from libexpat/issue-629-heap-use-after-free
[CVE-2022-40674] tests: Cover heap use-after-free issue in doContent (follow-up to #629)
2022-09-14 19:56:38 +02:00
Sebastian Pipping
721169eeca Changes: Document heap use-after-free CVE-2022-40674 2022-09-14 18:59:03 +02:00
Sebastian Pipping
a7ce80a013 tests: Cover heap use-after-free issue in doContent 2022-09-14 18:57:51 +02:00
Sebastian Pipping
a48c407000
Merge pull request #641 from libexpat/issue-626-static-library-symbol-visibility
Stop exporting API symbols when building a static library (fixes #626)
2022-09-12 18:19:09 +02:00
Sebastian Pipping
107437adcd Stop exporting API symbols when building a static library 2022-09-12 17:07:14 +02:00
Sebastian Pipping
dde178b976
Merge pull request #629 from RMJ10/missing-store-raw
Ensure raw tagnames are safe exiting internalEntityParser
2022-09-11 21:01:20 +02:00
Sebastian Pipping
528dbea4ee
Merge pull request #627 from libexpat/issue-597-cmake-migrate-set-cache-to-option
CMake: Unify inconsistent use of set() and option() (related to #597)
2022-09-11 16:39:19 +02:00
Sebastian Pipping
67db2adbed cmake: Mark _EXPAT_M32 and EXPAT_*_POSTFIX as advanced 2022-09-09 16:04:35 +02:00
Sebastian Pipping
cb10e651c0 cmake: Unify set(var default CACHE type desc) and option(var desc default)
.. into expat_shy_set(var default CACHE type desc).

Note that this new macro is intended to be used for all future options.
Also, because we are no longer using plain option(), wheter policy CMP0077
is active in mode OLD or NEW is no longer of importance.
Hence the code related to CMP0077 could could be dropped.
2022-09-09 16:04:33 +02:00
Sebastian Pipping
1cc2b29c47
Merge pull request #632 from libexpat/github-actions-off-deprecated-ubuntu-18-04
Get GitHub Actions CI off deprecated Ubuntu 18.04
2022-09-09 16:00:53 +02:00
Sebastian Pipping
0d2def4cce Changes: Briefly document infra work 2022-09-09 01:53:05 +02:00
Sebastian Pipping
84bec8c72b GitHub Actions: Pin remaining unpinned ubuntu-latest 2022-09-09 01:53:05 +02:00
Sebastian Pipping
55ebc6d04e GitHub Actions: Stop installing Clang when not used 2022-09-09 01:53:05 +02:00
Sebastian Pipping
1156ae7dca GitHub Actions: Avoid Ubuntu 20.04 for coverage collection
.. because its MinGW GCC 9.3.0 fails to create any .gcda files
at test runtime (while that works just fine on 18.04 and 22.04).
2022-09-09 01:53:05 +02:00
Sebastian Pipping
003ac7403f coverage.sh|qa.sh: Fix copying of DLLs for Wine/MinGW for Ubuntu 22.04
Ubuntu 22.04 no longer has libgcc_s_sjlj-1.dll but needs
libgcc_s_dw2-1.dll now, instead.
2022-09-09 01:53:05 +02:00
Sebastian Pipping
6311d58530 GitHub Actions: Fix installation of 32bit Wine on Ubuntu 20.04
Same approach as https://github.com/uriparser/uriparser/pull/144
2022-09-09 01:53:05 +02:00
Sebastian Pipping
666a749f15 GitHub Actions: Get off deprecated Ubuntu 18.04 2022-09-09 01:53:05 +02:00
Sebastian Pipping
80e6c69140 cmake: Avoid error "windres: Command not found" with MinGW on Ubuntu 20.04
Related:
https://gitlab.kitware.com/cmake/cmake/-/issues/20500#note_720469
2022-09-09 01:46:33 +02:00
Sebastian Pipping
9d246a7225
Merge pull request #636 from neheb/patch-1
CMake: Drop leading whitespace from a #cmakedefine line in file expat_config.h.cmake to workaround issues with Meson
2022-08-28 15:26:30 +02:00
Sebastian Pipping
fa9f063fe4
Merge pull request #637 from neheb/cl
apply-clang-format.sh: Add support for BSD find
2022-08-28 15:21:17 +02:00
Sebastian Pipping
acf35f3f7c
Merge pull request #638 from libexpat/fix-xmltest-log-sh-drop-more-wine-bug-output
fix-xmltest-log.sh: Drop more Wine bug output
2022-08-28 15:20:50 +02:00
Sebastian Pipping
05e904118f fix-xmltest-log.sh: Drop more Wine bug output 2022-08-28 01:38:43 +02:00