Commit Graph

2094 Commits

Author SHA1 Message Date
Rhodri James
7b9b40bcee Refactor and extend external entity parse error testing 2017-07-16 02:01:30 +02:00
Rhodri James
6381273b8b Check parse errors in external entity parsers 2017-07-16 01:59:28 +02:00
Rhodri James
24e16ecbd8 Test UTF-8 BOM is recognised in UTF-8 external entity 2017-07-16 01:58:07 +02:00
Rhodri James
ab53e5da3f Test unknown encoding in external entity parser (increase coverage) 2017-07-16 01:55:23 +02:00
Rhodri James
0f403d1d5d Check handling of long element names with namespaces 2017-07-16 01:52:59 +02:00
Rhodri James
da93b3992a Refactor allocator test support 2017-07-16 01:44:33 +02:00
Sebastian Pipping
9bacf1735f Merge branch 'travis-ci' (issue #23) 2017-07-15 19:48:55 +02:00
Sebastian Pipping
7e84c8cafc Travis CI: Ensure that Clang 4.0 is installed 2017-07-15 19:48:47 +02:00
Sebastian Pipping
4f81bb01c1 qa.sh: Use clang for mode "address" to detect memory leaks (#23) 2017-07-15 19:48:47 +02:00
Sebastian Pipping
7bc4aa61ae qa.sh: Rename BASE_FLAGS to BASE_COMPILE_FLAGS 2017-07-15 19:48:45 +02:00
Sebastian Pipping
cdd5b17ea7 Merge branch 'make-check-memory' (issue #23) 2017-07-15 19:15:49 +02:00
Sebastian Pipping
86c00d7f64 Changes: Document test suite memleak fixes 2017-07-15 19:14:49 +02:00
Sebastian Pipping
483803255d minicheck.c: Protect against potential NULL dereference 2017-07-15 19:14:49 +02:00
Sebastian Pipping
7c82b0b4ab minicheck.c: Rename *_dispose to *_free 2017-07-15 19:07:30 +02:00
Rhodri James
c5b129e597 Free the external entity parser in external_entity_loader_set_encoding()
Removes the last of the memory leaks detected by AddressSanitizer
in the test suite (see Issue #23)
2017-07-14 17:55:51 +01:00
Rhodri James
e4bfe3c7d1 Free all the data structures associated with test cases.
Removes some of the memory leaks discovered by AddressSanitizer
in the test suite (see Issue #23)
2017-07-14 17:53:56 +01:00
Rhodri James
38c1ce7cd5 Free the content model in dummy_element_decl_handler()
Removes some of the memory leaks found by AddressSanitizer in
the test suite (see Issue #23)
2017-07-14 17:33:59 +01:00
Rhodri James
d350a6cb0d Free external entity parser in external_entity_param()
Removes some of the memory leaks detected by AddressSanitizer in
the test suite (see Issue #23).
2017-07-14 17:22:54 +01:00
Rhodri James
8cdcb7219d Free external entity parser in external_entity_suspender()
Removes some memory leaks detected by AddressSanitizer in
the test suite (see Issue #23)
2017-07-14 17:15:12 +01:00
Rhodri James
448cd2acac Free external entity parser in external_entity_param_checker()
Removes some of the memory leaks detected by AddressSanitizer
in the test suite (see Issue #23)
2017-07-14 17:13:22 +01:00
Rhodri James
a7db7a1c1a Free external entity parser in external_entity_resetter() when done
Deals with some of the memory leaks found by AddressSanitizer in
the test suite (Issue #23)
2017-07-14 17:03:25 +01:00
Rhodri James
d3b3f7fa48 Free external entity parser in external_entity_loader() when done.
Removes some memory leaks detected by AddressSanitizer in the
test suite (see Issue #23)
2017-07-14 17:02:34 +01:00
Rhodri James
18be28458b Use correct parser to signal failure in external_entity_loader() 2017-07-14 16:49:50 +01:00
Sebastian Pipping
7c3eedb20b xmlparse.c: Adjust _GNU_SOURCE define in favor of Python (#77) 2017-07-12 23:55:49 +02:00
Sebastian Pipping
c5daa8c0b1 Changes: Improve 2.2.2 security notes 2017-07-12 23:00:19 +02:00
Sebastian Pipping
f8bd51b5a3 xmlparse.c: Avoid _GNU_SOURCE macro redefinition (#77) 2017-07-12 21:09:39 +02:00
Sebastian Pipping
1ea1425d15 xmlparse.c: Address compile warning with -DNDEBUG (issue #76) 2017-07-12 20:20:22 +02:00
Sebastian Pipping
b5aaa782fa runtests.c: Protect against -DNDEBUG (issue #76 related) 2017-07-12 20:16:37 +02:00
Sebastian Pipping
e72c42eb18 Prepare release version 2.2.2 2017-07-12 19:00:02 +02:00
Sebastian Pipping
8c9ec41705 Bump version info from 7:3:6 to 7:4:6 2017-07-12 19:00:02 +02:00
Sebastian Pipping
5f51145401 Move to C99 (#73) and fix ULL integer literals (#69) 2017-07-12 18:47:37 +02:00
Sebastian Pipping
21efd0f600 Travis CI: Use -DXML_POOR_ENTROPY to fix compilation
I would use libbsd but it's broken on Ubuntu trusty:
```
/usr/include/bsd/stdlib.h:52:27: error: unknown type name 'u_char'
 void arc4random_addrandom(u_char *dat, int datlen);
                           ^
```
https://travis-ci.org/libexpat/libexpat/jobs/252880355
2017-07-12 18:34:52 +02:00
Sebastian Pipping
ba03edc6e6 Changes: Document low quality entropy detection (related to #43) 2017-07-12 18:11:28 +02:00
Sebastian Pipping
ff0207e607 xmlparse.c: Protect against accidental use of low quality entropy (issue #43) 2017-07-12 18:11:01 +02:00
Sebastian Pipping
939f5af58f xmlparse.c: Move includes up (to reduce chance of macro interference)
Commit 6ee259bc84 is related.
2017-07-12 17:47:55 +02:00
Sebastian Pipping
a449035d04 Changes: Communicate security aspects in detail (#60) 2017-07-12 16:28:27 +02:00
Rhodri James
196bea60b1 Fix protocolEncodingName. (pull request #70)
Ensure that protocolEncodingName is always either NULL or points
to the correct encoding for the parser, even if the parser is
reset.
2017-07-10 22:10:49 +02:00
Sebastian Pipping
14c59476cf Merge branch 'cmake-fixes-from-vtk' (pull request #72) 2017-07-09 22:41:18 +02:00
Sebastian Pipping
61e1a31fdc Changes: Mention CMake improvements 2017-07-09 22:40:17 +02:00
Ben Boeckel
f01b2c0e27 cmake: use the current binary directory
This is not necessarily the top-level CMake directory (such as when
expat is included inside of another project's source tree directly), so
we should instead use the one relative to this `CMakeLists.txt` file.
2017-07-05 17:13:57 -04:00
Ben Boeckel
c2888d56c0 ConfigureChecks: configure into the build tree
This helps to keep the source tree cleaner.
2017-07-05 17:12:38 -04:00
Ben Boeckel
ab89ae73c7 cmake: include the current directory's ConfigureChecks.cmake
The file we want is always in the same directory. The
`ConfigureChecks.cmake` file is included in many projects and the wrong
`CMAKE_MODULE_PATH` can cause the wrong one to be used here.
2017-07-05 17:11:48 -04:00
Ben Boeckel
dc4422e894 cmake: remove executable bits from cmake files
These files are not executable and should not be stored as such inside
of the repository.
2017-07-05 17:11:30 -04:00
Sebastian Pipping
2994cfc3d9 siphash.h: Ensure <=80 line length 2017-07-05 14:07:10 +02:00
Sebastian Pipping
736d47c8ef siphash.h: Add const qualifiers 2017-07-05 14:06:37 +02:00
Sebastian Pipping
44b8064042 Changes: Add MOX reference 2017-07-01 17:30:19 +02:00
Sebastian Pipping
726cd8cdb8 Merge branch 'xmlts-local-cache' (pull request #67) 2017-07-01 17:26:11 +02:00
Rhodri James
f196feb61f Add means to avoid downloading xmlts.zip in coverage tests
Modifies target tests/xmlts.zip so that if the environment variable
XMLTS_DIR is set, the xmlts.zip will be copied from there rather
than downloaded again from xml.org.  I currently need this
because I have a very limited internet connection.
2017-07-01 17:21:24 +02:00
Sebastian Pipping
6ee259bc84 xmlparse.c: Move includes up to fix macro interference
Guilty is our macro "buffer" resolving to "parser->m_buffer".
Issue #59 is related.
2017-07-01 14:52:24 +02:00
Sebastian Pipping
b37622e679 Changes: Mention parameter validation bug 2017-07-01 14:43:25 +02:00