Commit graph

3681 commits

Author SHA1 Message Date
Sebastian Pipping
7e27f561a6 Sync file headers 2022-10-24 18:32:42 +02:00
Sebastian Pipping
18439d4f8b
Merge pull request #666 from libexpat/improve-examples
Improve examples
2022-10-24 18:32:56 +02:00
Sebastian Pipping
56967f83d6
Merge pull request #650 from libexpat/issue-649-fix-overeager-dtd-destruction
[CVE-2022-43680] Fix overeager DTD destruction (fixes #649)
2022-10-24 16:34:19 +02:00
Sebastian Pipping
55ca001112 Changes: Document #666 2022-10-24 16:01:20 +02:00
Sebastian Pipping
a608db2883 cmake: Resolve duplication related to building examples 2022-10-24 16:01:20 +02:00
Sebastian Pipping
9294082e74 examples: Add some whitespace for readability 2022-10-24 16:01:20 +02:00
Sebastian Pipping
dbf1202529 examples: Make use of XML_GetBuffer 2022-10-24 16:01:19 +02:00
Sebastian Pipping
2f38031778 examples/elements.c: Resolve unused include of <wchar.h> 2022-10-24 16:00:45 +02:00
Sebastian Pipping
77409cde88 examples/elements.c: Be consistent across examples regarding OOM detection 2022-10-24 16:00:45 +02:00
Sebastian Pipping
894b98d9b3 examples: Be consistent across examples regarding read looping and main exit 2022-10-24 16:00:45 +02:00
Sebastian Pipping
37386fd2d3 examples/elements.c: Be consistent in parse error reporting format across examples 2022-10-24 16:00:45 +02:00
Sebastian Pipping
2b3b95c670 examples/outline.c: Be consistent in main loop exit across examples 2022-10-24 16:00:45 +02:00
Sebastian Pipping
023b95dba0 examples/outline.c: Make element handler signatures consistent across examples 2022-10-24 16:00:45 +02:00
Sebastian Pipping
93a757ab7d examples/outline.c: Make use of BUFSIZ from stdio.h consistent across examples 2022-10-24 16:00:43 +02:00
Sebastian Pipping
fcb91e43bd examples: Make passing of depth pointer consistent across examples 2022-10-24 16:00:15 +02:00
Sebastian Pipping
9c7bd378b6 examples: Resolve use of unused variables argc and argv 2022-10-24 16:00:13 +02:00
Sebastian Pipping
5ac714074d
Merge pull request #665 from libexpat/dependabot/github_actions/actions/upload-artifact-3.1.1
Actions(deps): Bump actions/upload-artifact from 3.1.0 to 3.1.1
2022-10-24 15:41:28 +02:00
Sebastian Pipping
eedc5f6de8 Changes: Document #649 2022-10-24 14:58:45 +02:00
Sebastian Pipping
43992e4ae2 tests: Cover overeager DTD destruction in XML_ExternalEntityParserCreate 2022-10-24 14:58:45 +02:00
Sebastian Pipping
5290462a7e lib: Fix overeager DTD destruction in XML_ExternalEntityParserCreate 2022-10-24 14:58:45 +02:00
dependabot[bot]
66dc6066da
Actions(deps): Bump actions/upload-artifact from 3.1.0 to 3.1.1
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3.1.0...v3.1.1)

---
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>
2022-10-24 12:05:28 +00:00
Sebastian Pipping
56d85659ac examples/outline.c: Rename "Buff" to "buf" for consistency across examples 2022-10-24 01:29:05 +02:00
Sebastian Pipping
bd351fad20 examples/outline.c: Make "Buff" a local variable 2022-10-24 00:58:25 +02:00
Sebastian Pipping
7eaccc0332 examples/outline.c: Rename variable "p" to "parser" 2022-10-24 00:53:51 +02:00
Sebastian Pipping
391551620e
Merge pull request #663 from libexpat/expat-config-h-multiple-inclusion-guard
Protect header expat_config.h from multiple inclusion
2022-10-23 21:58:42 +02:00
Sebastian Pipping
6393f2d3ff Protect expat_config.h against multiple inclusion 2022-10-23 17:33:32 +02:00
Sebastian Pipping
91920104de
Merge pull request #654 from libexpat/issue-613-fix-processing-of-nested-entities
Fix processing of nested entities (fixes #613)
2022-10-18 01:32:06 +02:00
Sebastian Pipping
6acab0a2d9 Changes: Document #613 2022-10-17 23:11:52 +02:00
Sebastian Pipping
fc95d53eb5 tests: Cover suspend with inside nested entites in internalEntityProcessor 2022-10-17 23:11:10 +02:00
Sebastian Pipping
6fa8957d33 lib: Fix suspend with inside nested entites in internalEntityProcessor 2022-10-17 23:11:10 +02:00
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