Commit graph

4004 commits

Author SHA1 Message Date
Sebastian Pipping
4a4e7cfae6 tests/handlers.h: Drop unused type XmlParseFunction
Last use removed in commit b3d14b0d3c
2023-10-25 22:08:04 +02:00
Sebastian Pipping
5347517942
Merge pull request #783 from SonyMobile/remove-singlebytes-switching
tests: Stop switching between XML_Parse and _XML_Parse_SINGLE_BYTES
2023-10-25 18:38:53 +02:00
Snild Dolkow
1222ae34fb tests: Use SINGLE_BYTES in test_nobom_utf16_le
All tests now run one instance where SINGLE_BYTES is equivalent to a
single XML_Parse call. Using SINGLE_BYTES therefore gives more coverage,
as evidenced by the new failure we now have to avoid in the test, until
it can be fixed.
2023-10-25 17:25:48 +02:00
Snild Dolkow
29babedcab tests: Remove EE_PARSE_FULL_BUFFER
All tests now run one instance where SINGLE_BYTES is equivalent to a
single XML_Parse call. There is no longer a need for individual tests
to switch between them.
2023-10-25 17:25:05 +02:00
Snild Dolkow
b3d14b0d3c tests: Remove choice between XML_Parse and SINGLE_BYTES
Since commit 091ba48d ("tests: Run SINGLE_BYTES with no chunking"),
all tests are run an extra time with SINGLE_BYTES set to perform just
a single XML_Parse() call. There is no longer a need for individual
tests to switch between them.
2023-10-25 17:25:00 +02:00
Sebastian Pipping
9e1c41343c
Merge pull request #780 from libexpat/xml-dtd-undefined-fix-ext-parser-create-null-dereference
xmlparse.c: Fix `NULL` pointer dereference in `setContext` via `XML_ExternalEntityParserCreate` for `XML_DTD` undefined
2023-10-24 17:05:31 +02:00
Sebastian Pipping
7b814b8220
Merge pull request #781 from libexpat/tests-move-to-the-right-place
tests/acc_tests.c: Move second BOM accounting test to the right place
2023-10-24 17:02:20 +02:00
Sebastian Pipping
258abf00fe
Merge pull request #782 from libexpat/tests-drop-mistaken-unused-variable-marker
tests/handlers.c: Drop mistaken unused variable marker
2023-10-24 17:01:35 +02:00
Sebastian Pipping
54f1c4595f tests/handlers.c: Drop mistaken unused variable marker 2023-10-23 21:18:04 +02:00
Sebastian Pipping
6e1ddc3b9c tests/acc_tests.c: Move second BOM accounting test to the right place
The test makes use of general entities (not parameter entities)
but was mis-filed under parameter entities.
2023-10-23 20:30:45 +02:00
Sebastian Pipping
4eeaf49262 xmlparse.c: Fix NULL pointer dereference in XML_ExternalEntityParserCreate
.. for context NULL inside function setContext
when macro XML_DTD is not defined at compile time.
2023-10-23 18:14:56 +02:00
Sebastian Pipping
a39a2f5c65
Merge pull request #779 from libexpat/doc-reference-html-add-macro-anchors
doc/reference.html: Add HTML anchors to definition of XML_* macros
2023-10-23 18:12:08 +02:00
Sebastian Pipping
7b0cf18e6f
Merge pull request #778 from libexpat/dependabot/github_actions/actions/checkout-4.1.1
Actions(deps): Bump actions/checkout from 4.1.0 to 4.1.1
2023-10-23 15:38:46 +02:00
Sebastian Pipping
76d60929c2 doc/reference.html: Add HTML anchors to definition of XML_* macros 2023-10-23 15:33:08 +02:00
Sebastian Pipping
a83a941898
Merge pull request #774 from libexpat/tests-rename-fail-unless
tests: Rename fail_unless to assert_true for clarity
2023-10-23 14:46:12 +02:00
dependabot[bot]
dcaa886004
Actions(deps): Bump actions/checkout from 4.1.0 to 4.1.1
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8ade135a41...b4ffde65f4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 12:20:43 +00:00
Sebastian Pipping
2604c59eb9
Merge pull request #773 from libexpat/clang-17
Upgrade Clang from 15 to 17
2023-10-21 15:52:09 +02:00
Sebastian Pipping
cf2a57bbe6 linux.yml: Make note about .ci.sh harder to overlook 2023-10-20 23:58:13 +02:00
Sebastian Pipping
e07ee1ec32 Actions: Upgrade Clang from 15 to 17 2023-10-20 23:58:13 +02:00
clang-format
a392427d3a Mass-apply clang-format 17.0.3 using ./apply-clang-format.sh 2023-10-20 23:49:51 +02:00
Sebastian Pipping
0cfeab4f1c
Merge pull request #772 from libexpat/tests-warnings-mingw
tests/memcheck.c: Avoid false positive -Wuse-after-free
2023-10-20 23:49:06 +02:00
Sebastian Pipping
da64791736 tests: Rename fail_unless to assert_true for clarity 2023-10-20 23:41:04 +02:00
Sebastian Pipping
cce19de59f tests: Rename _fail_unless to _assert_true for clarity 2023-10-20 23:24:46 +02:00
Sebastian Pipping
eeab6366b0 tests/memcheck.c: Avoid false positive -Wuse-after-free
Symptom was this compile warning from MinGW GCC 12:
> [..]/expat/tests/memcheck.c: In function ‘tracking_realloc’:
> [..]/expat/tests/memcheck.c:169:25: error: pointer ‘ptr’ may be used after ‘realloc’ [-Werror=use-after-free]
>   169 |       entry->allocation = ptr;
>       |       ~~~~~~~~~~~~~~~~~~^~~~~
> [..]/expat/tests/memcheck.c:166:25: note: call to ‘realloc’ here
>   166 |     entry->allocation = realloc(ptr, size);
>       |                         ^~~~~~~~~~~~~~~~~~

The warning is a false positive since the code was only using ptr
when realloc failed where it is documented that the original pointer is
not freed.

The workaround is to no longer override-and-restore entry->allocation
but to only write to it when realloc was successful.  The original
value was equal to ptr so the result is the same.
2023-10-20 20:19:37 +02:00
Sebastian Pipping
a68399a05b
Merge pull request #770 from libexpat/xmlwf-sync-man-page
xmlwf: Get man page back in sync (i.e. add `--help`, `--version` and `-g <bytes>`)
2023-10-18 21:46:41 +02:00
Sebastian Pipping
4d475d97d6 doc/xmlwf.xml: Add missing entry on "-g <bytes>" 2023-10-18 16:48:03 +02:00
Sebastian Pipping
1746075001 doc/xmlwf.xml: Add missing entry on -h|--help 2023-10-18 16:48:03 +02:00
Sebastian Pipping
114cb042ae doc/xmlwf.xml: Add --help and --version where missing 2023-10-18 16:48:03 +02:00
Sebastian Pipping
28347d9586
Merge pull request #764 from libexpat/xml-context-bytes-zero
Be stricter about macro XML_CONTEXT_BYTES at build time
2023-10-06 14:21:36 +02:00
Sebastian Pipping
96985a1a07 lib/xmlparse.c: Make clang-format 16.0.6 happy again 2023-10-05 15:44:10 +02:00
Sebastian Pipping
23110a864d Be stricter about macro XML_CONTEXT_BYTES
- Start treating -DXML_CONTEXT_BYTES=0 as "no context"
  rather than "context of size 0".  Was documented as
  "must be set to a positive integer", previously.

- Enforce that macro XML_CONTEXT_BYTES is defined at build time to
  avoid accidental misbuilds lacking context in environments that
  bypass both of Expats official build systems.

- Detect and reject use of negative context size at compile time.
2023-10-05 15:44:10 +02:00
Sebastian Pipping
acbcd0915d
Merge pull request #766 from libexpat/doc-parse-buffer-variables
lib/xmlparse.c: Improve parse buffer variables documentation
2023-10-05 14:50:10 +02:00
Sebastian Pipping
32f64cf174
Merge pull request #762 from libexpat/doc-reference-html-promote-xml-parsebuffer-more
doc/reference.html: Promote function XML_ParseBuffer more
2023-10-05 14:49:29 +02:00
Sebastian Pipping
3ae5431d22
Merge pull request #765 from libexpat/consistent-expat-config-h-includes
Make inclusion to expat_config.h consistent
2023-10-05 01:35:26 +02:00
Sebastian Pipping
dd34d0e65c lib/xmlparse.c: Improve parse buffer variables documentation 2023-10-04 22:40:31 +02:00
Sebastian Pipping
ab43d8d116 Make inclusion to expat_config.h consistent
.. and priorize the local build over the system header.
2023-10-04 19:58:28 +02:00
Sebastian Pipping
1d3ee5133e doc/reference.html: Make XML_Parse promote XML_ParseBuffer 2023-10-04 18:01:31 +02:00
Sebastian Pipping
81a705b6ae doc/reference.html: Wrap paragraphs by <p> for function XML_Parse 2023-10-03 23:25:09 +02:00
Sebastian Pipping
60654a3255
Merge pull request #763 from libexpat/fix-codespell-ci
Fix codespell CI + mass-replace "re-use[d]" by "reuse[d]"
2023-10-03 23:23:29 +02:00
Sebastian Pipping
c135d7a118 codespell.yml: Ignore "[p]arameter" in xmlwf help output 2023-10-03 21:33:55 +02:00
Sebastian Pipping
c1d4c439a1 docs: Mass-replace "re-use[d]" by "reuse[d]"
Pointed out by codespell.
2023-10-03 21:33:55 +02:00
Sebastian Pipping
1763071577
Merge pull request #761 from libexpat/xmlwf-help-version
xmlwf: Support --help and --version
2023-09-29 17:48:21 +02:00
Sebastian Pipping
92cdc783f1 xmlwf: Get help output alignment back in order 2023-09-29 12:55:17 +02:00
Sebastian Pipping
4c6731ad11 xmlwf: Use XMLWF_EXIT_SUCCESS where missing 2023-09-29 12:55:17 +02:00
Sebastian Pipping
0b3ef852bc xmlwf: Support --help and --version 2023-09-29 12:55:17 +02:00
Sebastian Pipping
900d2a7cd2 xmlwf: Better document that usage(..) calls exit(..) 2023-09-29 12:55:17 +02:00
Sebastian Pipping
bc26bc5896 xmlwf: Break up conditional before upcoming extension 2023-09-29 12:06:05 +02:00
Sebastian Pipping
8741d2a1db
Merge pull request #760 from libexpat/doc-reference-html-okcss-1-2-0
doc/reference.html: Upgrade to OK.css 1.2.0
2023-09-29 11:42:12 +02:00
Sebastian Pipping
0cf825c342 doc/reference.html: Add paragraph wrap for XML_ParserCreate
.. in order to fix styling.
2023-09-28 21:00:00 +02:00
Sebastian Pipping
08efcde3be
Merge pull request #759 from libexpat/xmlwf-custom-buffer-size
xmlwf: Support custom buffer size for XML_GetBuffer and read
2023-09-28 20:54:24 +02:00