Commit Graph

1962 Commits

Author SHA1 Message Date
Rhodri James
28e9820bcd Test suspending and resuming parse in parameter entity substitution 2017-07-22 22:49:14 +02:00
Rhodri James
f9c01d3bae Test suspending and resuming parse during entity substitution 2017-07-22 22:49:14 +02:00
Rhodri James
9edf18d4ef Add test to ensure a hash collision while expanding hash table
This is purely an exercise in code coverage; there is no user-level
way of telling that the hash table has been expanded or that a
collision occurred.
2017-07-22 22:49:14 +02:00
Rhodri James
440df48dc3 Test suspending parse during epilog 2017-07-22 22:49:13 +02:00
Rhodri James
9528e62a1e Test aborting in the epilog not from a CR character 2017-07-22 22:49:13 +02:00
Rhodri James
ecfd3f15ad Test handling of partial characters at the end of the epilog 2017-07-22 22:49:13 +02:00
Rhodri James
4bec1abfd4 Test incomplete token in epilog 2017-07-22 22:49:13 +02:00
Rhodri James
1cab6d80f5 Test comment in epilog with failing allocator 2017-07-22 21:57:20 +02:00
Rhodri James
208d652559 Test PI handling in epilog with a failing allocator 2017-07-22 21:57:20 +02:00
Rhodri James
8a8c871723 Extend abort test to cover more epilog code 2017-07-22 21:57:20 +02:00
Rhodri James
eefb733dc7 Test aborting parse during epilog processing 2017-07-22 21:57:20 +02:00
Rhodri James
e8d8c84e3e Test suspending parse during an XML declaration 2017-07-22 21:57:20 +02:00
Rhodri James
6b2ead89fb Shuffle code to keep similar things together.
No functional changes
2017-07-22 21:56:11 +02:00
Rhodri James
b690ac32c1 Test group with many elements and a failing reallocator 2017-07-22 21:52:47 +02:00
Rhodri James
46c39a18c1 Test deeply nested group parsing with a failing allocator 2017-07-22 21:52:47 +02:00
Rhodri James
1ca9975b91 Add test for external parameter entity with "not standalone" handler 2017-07-22 21:52:47 +02:00
Rhodri James
6e63cc24bd Test external param entity with no further external parser 2017-07-22 21:52:47 +02:00
Rhodri James
79d190acef Test undefined system parameter entity in external DTD 2017-07-22 21:52:46 +02:00
Rhodri James
b76c65d111 Test recursive parameter entity is rejected 2017-07-22 21:52:46 +02:00
Rhodri James
80552b5c60 Test skipped parameter entity in external DTD triggers handler 2017-07-22 21:52:46 +02:00
Rhodri James
ff15a49746 Review 2017-03-13: refactor XML_Expat_Version test
Also revised to allow for the different definitions of XML_LChar.
Previous versions will not have worked in XML_UNICODE builds.
2017-07-22 21:52:16 +02:00
Rhodri James
78a68b76e3 Review 2017-03-13: construct test string to avoid magic numbers 2017-07-22 21:50:58 +02:00
Rhodri James
d697e27038 Review 2017-03-13: replace magic number with appropriate string len 2017-07-22 21:50:57 +02:00
Rhodri James
be42a4ae1f Remove warning about potentially unset variable in tests
Also make test function external_entity_public() more robust
against misuse.
2017-07-22 21:48:17 +02:00
Rhodri James
1d086b2915 Test standalone parameter entity coverage 2017-07-22 21:46:17 +02:00
Rhodri James
1adb2438d0 Test substituted public entity with long name against failing realloc 2017-07-22 21:46:17 +02:00
Rhodri James
3c526f6d6c Test group with choice in element declaration 2017-07-22 21:46:17 +02:00
Rhodri James
da5c188913 Add element decl handler to nested group reallocation test 2017-07-22 21:46:17 +02:00
Rhodri James
260a7644d7 Add element declaration handler to nested group test 2017-07-22 21:46:17 +02:00
Rhodri James
1bb33c7027 Test nested groups with a failing reallocator 2017-07-22 21:46:16 +02:00
Rhodri James
507c2e5c9b Test deeply-nested groups 2017-07-22 21:46:16 +02:00
Rhodri James
383e762f8c Test public notation with no system ID 2017-07-22 21:46:16 +02:00
Rhodri James
d4bc5da92b Test system notation with failing allocator 2017-07-22 21:46:16 +02:00
Rhodri James
6ae8e2777e Test public notation with long system ID against failing allocator 2017-07-22 21:46:16 +02:00
Rhodri James
1044af1f31 Extend notation allocation test with notation declaration handler
This extends the code coverage a little, in particular checking
another allocation failure path.
2017-07-22 21:46:16 +02:00
Rhodri James
5a1f46a87d Extend PE allocation test with long entity name 2017-07-22 21:46:16 +02:00
Rhodri James
cc6edd8913 Test DTD processing stops for undefined parameter entities 2017-07-22 21:46:16 +02:00
Rhodri James
4608ff10be Test redefining predefined entities 2017-07-22 21:46:16 +02:00
Rhodri James
b30bd12020 Add entity decl handler to notation entity allocation test 2017-07-22 21:46:16 +02:00
Rhodri James
775e63708d Test notation entity with failing allocator 2017-07-22 21:46:16 +02:00
Rhodri James
71e8442db9 Extend NotStandalone tests to also exclude external entity handlers 2017-07-22 21:46:16 +02:00
Rhodri James
fab38d3fc0 Test public doctype with long public name against failing allocator 2017-07-22 21:46:16 +02:00
Rhodri James
ee957bb60a Test attribute with defaulted long enums and a failing reallocator 2017-07-22 21:46:16 +02:00
Rhodri James
e909b67123 Test attribute list with a NOTATION and default value 2017-07-22 21:46:16 +02:00
Rhodri James
5f124f4e7c Test attribute with implied large enum with a failing reallocator 2017-07-22 21:46:16 +02:00
Rhodri James
98ead688f1 Expand attribute declaration test 2017-07-22 21:46:16 +02:00
Rhodri James
9bb1b1e554 Test attribute list handling with #REQUIRED 2017-07-22 21:46:16 +02:00
Sebastian Pipping
5a642dd1e5 runtests.c: Resolve setting handlers twice
Was introduced at cherry-pick ab53439060
by mistake.
2017-07-22 21:39:56 +02:00
Sebastian Pipping
04ea5302cd runtests.c: Fix memleaks 2017-07-22 21:36:55 +02:00
Rhodri James
58ecc804be Test long attribute enums with a failing reallocator 2017-07-22 21:31:49 +02:00
Rhodri James
f1b5c14b96 Test attribute enum handling with failing allocator 2017-07-22 21:31:45 +02:00
Rhodri James
66435cff61 Test attribute enum value handling 2017-07-22 21:31:40 +02:00
Rhodri James
8857da5a65 Test foreign DTD with no contents 2017-07-22 21:31:12 +02:00
Rhodri James
cfcfd4685f Test foreign DTD with rejecting standalone handler 2017-07-22 21:31:07 +02:00
Rhodri James
060c12bc19 Test Foreign DTD setting with failing allocator 2017-07-22 21:31:02 +02:00
Rhodri James
f03d06a8c1 Test XML_UseForeignDTD without external subset 2017-07-22 21:30:57 +02:00
Rhodri James
234c654c19 Test XML_UseForeignDTD with a doctype 2017-07-22 21:30:52 +02:00
Rhodri James
4c197b0ef9 Add entity declaration handler to public parameter entity test 2017-07-22 21:30:47 +02:00
Rhodri James
604a527186 Test long public name in doctype allocator test 2017-07-22 21:30:42 +02:00
Rhodri James
8d42ab97d9 Test invalid name for public doctype 2017-07-22 21:30:37 +02:00
Rhodri James
ddddcfd393 Expand public doctype allocation test 2017-07-22 21:30:32 +02:00
Rhodri James
9223704553 Test allocation failure paths parsing a public doctype 2017-07-22 21:30:27 +02:00
Rhodri James
8babc25e44 Test public parameter entity with failing allocator 2017-07-22 21:30:22 +02:00
Rhodri James
e57d2413a1 Test various errors in parameter entity values 2017-07-22 21:30:17 +02:00
Rhodri James
78138c87f4 Test invalid character in foreign DTD parameter entity 2017-07-22 21:30:12 +02:00
Rhodri James
e5d84961bb Fix error reporting in external entity test handler 2017-07-22 21:29:55 +02:00
Rhodri James
9de593495c Test UTF-8 byte order mark in parameter entity value parsing 2017-07-22 21:29:13 +02:00
Rhodri James
c45340e138 Test aborting external entity value parser 2017-07-22 21:29:08 +02:00
Rhodri James
2cbcf88443 Test malformed XML/text declaration rejected by ext entity parser 2017-07-22 21:29:03 +02:00
Rhodri James
1d80cc21a8 Test XML declaration in external entity processing 2017-07-22 21:28:57 +02:00
Rhodri James
ac16e93789 Extend external parameter entity nested parser testing 2017-07-22 21:28:50 +02:00
Sebastian Pipping
782bb8a9a5 runtests.c: Fix memleaks 2017-07-22 21:28:20 +02:00
Rhodri James
e6dbd40799 Test nested external parser handling 2017-07-22 21:27:02 +02:00
Rhodri James
71c4f59886 Test unknown encoding handling in external parameter entity handler 2017-07-22 21:25:54 +02:00
Rhodri James
1fbdc13dcb Test a bad encoding is rejected at initialisation time 2017-07-22 21:25:49 +02:00
Rhodri James
ac40d1ed35 Test declaring a UTF-16 encoding while actually in UTF-8 is rejected 2017-07-22 21:25:44 +02:00
Rhodri James
80a32d09de Test XML declaration with long encoding name and failing allocator 2017-07-22 21:25:39 +02:00
Rhodri James
50ce682021 Test XML declaration handling with a duff allocator 2017-07-22 21:25:34 +02:00
Rhodri James
5279d9c588 Test external entity parsing suppressed with UNLESS_STANDALONE parameter 2017-07-22 21:25:29 +02:00
Rhodri James
e8ae6734bc Test partial UTF-8 characters in IGNORE section 2017-07-22 21:25:24 +02:00
Rhodri James
9948d7cdfc Refactor to reduce proliferation of external entity handlers 2017-07-22 21:18:57 +02:00
Sebastian Pipping
aa82b779bd Changes: Document dangling pointer fix 2017-07-20 22:17:52 +02:00
Sebastian Pipping
786d7abfcd xmlparse.c: Fix dangling pointer caused by use of realloc
Variables pool->ptr and pool->start point to addresses
that may have been freed if realloc chose the path of
a new base address.  So we do the math on these pointers
while they are not dangling, yet.

For a related article:
http://trust-in-soft.com/dangling-pointer-indeterminate/
2017-07-20 22:16:09 +02:00
Sebastian Pipping
99fb4b57f8 xmlparse.c: Fix DLL hijacking vulnerability (#82) 2017-07-19 20:19:37 +02:00
Sebastian Pipping
c5897e8c14 xmlparse.c: Fix comment typo 2017-07-19 20:19:07 +02:00
Sebastian Pipping
8c62e0aad1 Support arc4random for pre-10.7/Lion macOS 2017-07-19 15:39:33 +02:00
Sebastian Pipping
947879849f Rely on HAVE_ARC4RANDOM_BUF for CloudABI 2017-07-19 15:36:48 +02:00
Sebastian Pipping
fc6a6c2e80 runtests.c: Fix indentation 2017-07-16 23:07:03 +02:00
Rhodri James
d164cd59f9 Change all URLs to use example.org 2017-07-16 23:07:03 +02:00
Rhodri James
eb3b5c3fc0 Use meaningful constants for return values from handlers 2017-07-16 23:07:03 +02:00
Rhodri James
c1a29e9ad6 Tweak attribute list to improve test coverage 2017-07-16 23:07:02 +02:00
Rhodri James
d9fce70b6f Test reallocation of attribute list with failing reallocator 2017-07-16 23:02:30 +02:00
Rhodri James
e24cf7a9cf Tweak test_alloc_external_entity to improve code coverage 2017-07-16 23:02:30 +02:00
Rhodri James
0153af32fb Extend skip handler test coverage 2017-07-16 23:02:30 +02:00
Rhodri James
ce81d26087 Test features are appropriately set 2017-07-16 23:02:30 +02:00
Rhodri James
2393c3fe26 Test predefined entities 2017-07-16 23:02:30 +02:00
Rhodri James
ec93648563 Make final reallocation test safe 2017-07-16 23:02:30 +02:00
Rhodri James
deeb8f2aae Test robustness against failing reallocator for parsing long names 2017-07-16 23:02:30 +02:00
Rhodri James
fe4f238660 Refactor long test data string 2017-07-16 23:02:30 +02:00
Rhodri James
c87613c958 Extend XML_GetBuffer testing coverage 2017-07-16 23:02:30 +02:00
Rhodri James
991693f12b Fix message in XML declaration handler 2017-07-16 23:02:30 +02:00
Rhodri James
a7884ded31 Restore groupSize if (re)allocation of groupConnector fails 2017-07-16 23:02:30 +02:00
Rhodri James
ab53439060 Ensure unparsed entity handler gets set
Revise dummy handlers to flag when they are executed, and ensure
that they are executed in the test.  Add XML to get the deprecated
unparsed entity handler executed, and ensure that the allocation
check fails each possible allocator in sequence despite the
caching of some allocations in the parser object.

NOTE that this commit does not pass check because of an allocation
bug.
2017-07-16 23:02:30 +02:00
Rhodri James
85ed69eaf9 Split combined triplet_count into two distinct flags 2017-07-16 23:02:30 +02:00
Sebastian Pipping
26175e6a44 Revert "Fix structure initialisation not to cause warnings"
This reverts commit 894033fab8.
2017-07-16 23:02:30 +02:00
Sebastian Pipping
317a023df2 runtests.c: Fix memleaks 2017-07-16 19:07:50 +02:00
Rhodri James
23e64e1fbc Increase test coverage of ignore section processing 2017-07-16 19:05:03 +02:00
Rhodri James
6cacca3987 Refactor previous test to use existing test functions 2017-07-16 19:04:55 +02:00
Rhodri James
7a3664ab29 Test a broken IGNORE section is faulted 2017-07-16 19:04:44 +02:00
Rhodri James
da0bac99ad Exercise conditional exclusion code 2017-07-16 19:04:13 +02:00
Rhodri James
7495f28469 Test suspending the parse in the middle of CDATA handling 2017-07-16 19:02:26 +02:00
Rhodri James
23c488c8fd Test aborting parse while processing CDATA 2017-07-16 19:02:21 +02:00
Rhodri James
1a8297c54c Test a variety of incomplete UTF-16 CDATA strings 2017-07-16 19:02:14 +02:00
Rhodri James
9ac26205bc Test handling of UTF-16 supplementary plane characters 2017-07-16 19:01:54 +02:00
Rhodri James
e932825e22 Test long UTF-16 CDATA (more than internal buffer size) 2017-07-16 19:01:38 +02:00
Rhodri James
fa37a8069a Test CDATA correctly runs through a default handler
In particular exercises a code path dealing with newlines
2017-07-16 19:01:20 +02:00
Rhodri James
b86bec407b Test handling of CDATA in an external entity parser 2017-07-16 19:01:14 +02:00
Rhodri James
47003df13d Test reallocation of URI in re-used binding with dodgy reallocator 2017-07-16 19:00:57 +02:00
Rhodri James
757ac4cb0e Test w3.org xmlns URL is correctly rejected 2017-07-16 19:00:44 +02:00
Rhodri James
c7d2fc3020 Test rejection of invalid attribute 'xml' and use of w3.org 2017-07-16 19:00:36 +02:00
Rhodri James
a2302df9b6 Test for correct rejection of 'xmlns' as an attribute 2017-07-16 19:00:30 +02:00
Rhodri James
1ead467e3c Test extension of URI buffer shared between element tags 2017-07-16 19:00:24 +02:00
Rhodri James
d8651ffbe8 Test medium-length element name with namespaces and a failing allocator 2017-07-16 19:00:18 +02:00
Rhodri James
ea6ab8be03 Test mixed prefixed and unprefixed attributes in a namespace 2017-07-16 18:59:49 +02:00
Rhodri James
cbfc54ee2f Test allocator handling of attribute with long namespace 2017-07-16 18:59:34 +02:00
Sebastian Pipping
8eda8b3c9e runtests.c: Fix memleaks 2017-07-16 18:58:21 +02:00
Rhodri James
1c0ecf1b95 Test attribute table hash collision handling 2017-07-16 18:56:24 +02:00
Rhodri James
d526cd09f7 Test long attribute names in a namespace with failing allocator 2017-07-16 18:56:24 +02:00
Rhodri James
ade4c402af Extend test coverage of external entity handler parameters 2017-07-16 18:56:24 +02:00
Rhodri James
d69a504a5a Comment change: explain why attribute count is twice what you expect 2017-07-16 18:56:23 +02:00
Rhodri James
b1bea33582 Check NULLing the encoding works before the parse is started 2017-07-16 18:56:23 +02:00
Rhodri James
1056c797dd Test for specific error from XML_UseForeignDTD() 2017-07-16 18:56:23 +02:00
Rhodri James
894033fab8 Fix structure initialisation not to cause warnings 2017-07-16 18:56:23 +02:00
Rhodri James
53e1698aa3 Add test case for long URIs in attributes with failing allocator 2017-07-16 18:56:23 +02:00
Rhodri James
c90f4bc24c Restore original nsAttsSize if reallocation fails 2017-07-16 18:56:23 +02:00
Rhodri James
41ab4fd94a Test reallocation failure in xmlns attribute handling
Note that this commit provokes a segfault due to a bug in
storeAtts()
2017-07-16 18:56:23 +02:00
Rhodri James
f748d87811 Test rejection of unbound prefix, improve coverage of attribute handling 2017-07-16 18:56:23 +02:00
Rhodri James
9f844cac4a Revert recorded size of attribute memory when reallocation fails 2017-07-16 18:56:23 +02:00
Rhodri James
edfcd16b98 Test long namespace names (1024 characters) 2017-07-16 18:56:23 +02:00
Rhodri James
8dabab1576 Refactor namespace allocation tests 2017-07-16 18:56:23 +02:00
Rhodri James
20c12da662 Extend code path coverage of entity handling 2017-07-16 18:56:23 +02:00
Rhodri James
f591474e62 Add test coverage for comments with a failing allocator 2017-07-16 18:43:34 +02:00
Rhodri James
8f3d13188b More coverage of PIs with failing allocator 2017-07-16 18:43:18 +02:00
Rhodri James
a1cffcb4ea Test parsing a PI with a failing allocator 2017-07-16 18:42:33 +02:00
Rhodri James
97ad97e9e9 Expand really long line test for encoded CDATA handling 2017-07-16 18:42:23 +02:00
Rhodri James
ef26a78837 Test right square bracket handling in external entity parses 2017-07-16 18:41:49 +02:00
Rhodri James
a3a68a412d More tests for the right square bracket control paths 2017-07-16 18:41:33 +02:00
Rhodri James
8bdf2bc102 Test handling of right square bracket at end of content data 2017-07-16 18:41:23 +02:00
Rhodri James
fe2e255025 Extend ASCII CDATA test to cover a default handler 2017-07-16 18:41:08 +02:00
Rhodri James
213c8523a3 Add CDATA section handlers for increased test coverage 2017-07-16 18:41:03 +02:00
Rhodri James
05fe0bd6c9 Add default handler to namespace failing allocation test
Increases code coverage.  Also tweaked allocation counts for
better coverage
2017-07-16 18:40:52 +02:00
Rhodri James
e92f989efe Add default handlers to character entity tests to extend coverage 2017-07-16 18:40:41 +02:00
Rhodri James
dabb530d17 Extend coverage of namespace start and end handlers 2017-07-16 18:40:33 +02:00
Rhodri James
41524fed85 Test external entity with no handler 2017-07-16 18:40:05 +02:00
Rhodri James
9a7d8d2c3f Tweak tests for greater allocation failure coverage 2017-07-16 18:39:56 +02:00
Rhodri James
7653beecee More external entity allocation failure coverage 2017-07-16 18:39:42 +02:00
Rhodri James
f71790ccf9 Extend coverage of partial character parsing 2017-07-16 18:37:31 +02:00
Rhodri James
6cfef69705 Test trailing CR in external entity parse 2017-07-16 18:37:17 +02:00
Rhodri James
15ef260f6b Test handling of trailing CR (rather than newline) 2017-07-16 18:37:00 +02:00
Sebastian Pipping
b24ecb9d46 runtests.c: Fix memleaks 2017-07-16 18:27:00 +02:00
Rhodri James
df0138ac3f Extend test coverage of external entity suspension 2017-07-16 18:23:44 +02:00
Rhodri James
80394e1792 Test suspending from an external entity's XML declaration handler 2017-07-16 18:23:20 +02:00
Sebastian Pipping
5c07211b84 runtests.c: Fix memory leaks 2017-07-16 02:09:23 +02:00
Sebastian Pipping
738162b60c runtests.c: Polish test_ext_entity_invalid_parse 2017-07-16 02:06:29 +02:00
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
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
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
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
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
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
Sebastian Pipping
ac256dafdf xmlparse.c: Fix parser NULL dereference
errorCode is a macro resolving to parser->m_errorCode.
Issue #59 is related.
2017-07-01 14:36:36 +02:00
Sebastian Pipping
00bd9dab99 Changes: Mention #68, give credit to Kerin Millar 2017-07-01 13:12:29 +02:00
Kerin Millar
c14a173105 conftools/get-version.sh: Fix unsafe expansions of $hdr
Also, use $() instead of ``. See http://mywiki.wooledge.org/BashFAQ/082.
2017-06-29 17:00:36 +01:00
Kerin Millar
9502963fd2 conftools/get-version.sh: Use printf rather than try to infer non-portable echo options 2017-06-29 16:59:59 +01:00
Sebastian Pipping
566d4bb019 Makefile.in: Waterproof against differences in line endings
For MinGW cross-compilation, second try.
2017-06-28 18:58:36 +02:00
Sebastian Pipping
58663de348 Merge branch 'mingw-crossdev-wine-linuxmint' (#64) 2017-06-28 16:03:52 +02:00
Sebastian Pipping
85bc1329dd xmlwf/readfilemap.c: Address -Wsign-compare warning
read:
http://pubs.opengroup.org/onlinepubs/009695399/functions/read.html
2017-06-27 23:26:49 +02:00
Sebastian Pipping
552a79bc98 coverage.sh: Symlink libwinpthread-1.dll as well for Linux Mint 2017-06-27 23:09:18 +02:00
Sebastian Pipping
e4f71eeaa0 tests: Address -Wformat compile warnings 2017-06-26 00:31:29 +02:00
Sebastian Pipping
93baf8759b Changes: Give credit to Viktor Szakats (#61) 2017-06-25 20:15:28 +02:00
Viktor Szakats
73a5a2e9c0 LoadLibrary() call to work correctly regardless of _UNICODE setting
This solution allows the build system to chose whichever mode, instead
of forcing the "ANSI" alternative of the API.
2017-06-25 19:42:17 +02:00
Sebastian Pipping
23a533d19b Changes: Mention fix to #60 2017-06-25 17:53:25 +02:00
Václav Slavík
95b95032f9 Fix building on win32 if _UNICODE is defined
Explicitly use LoadLibraryA() instead of the LoadLibrary() macro, which 
may expand to LoadLibraryW() depending on build configuration.
2017-06-25 17:38:11 +02:00
Sebastian Pipping
6dc3273aa5 coverage.sh: Fix two comment typos 2017-06-24 16:11:09 +02:00
Sebastian Pipping
3932cc8df4 siphash.h: Compress change log a bit 2017-06-23 21:06:20 +02:00
Sebastian Pipping
a85511958a Changes/siphash.h: Extend log, give credit to Victor Stinner 2017-06-23 21:06:20 +02:00
Victor Stinner
788bff7a3b Fix compiler warnings on Windows 64-bit
Explicitly cast on integer downcasting to fix compiler warnings.
2017-06-23 10:40:05 +02:00
Sebastian Pipping
2d82462393 siphash.h: Fix duplicate/leftover line in the header (#57) 2017-06-22 20:26:53 +02:00
Sebastian Pipping
956147f81a Changes: Mention getrandom detection issues on macOS (#52) 2017-06-19 20:37:34 +02:00
Sebastian Pipping
c74d380b8f siphash.h: Address lack of stdint.h for Visual Studio 2003-2008 2017-06-18 22:03:01 +02:00
Sebastian Pipping
1ce8ec1c12 Changes: Start post-2.2.1 section 2017-06-18 21:53:55 +02:00
Sebastian Pipping
602e6c78ca configure.ac: Fix mis-detection of getrandom on Debian GNU/kFreeBSD (#50)
There is no such thing but we need to link (not just compile) to realize.
2017-06-18 18:56:03 +02:00
spzeidler
e5e25fac16 Fix sh syntax in configure.ac (#49)
The old '==' sh-is-not-C issue
It doesn't matter in bash, but some other sh don't like it, so it's a portability issue
2017-06-18 14:30:22 +02:00
Karl Waclawek
c4446687cf Merge branch 'master' of https://github.com/libexpat/libexpat 2017-06-17 12:07:38 -04:00
Karl Waclawek
85718691e5 Windows release: Update README, remove VC++ 6.0 files from installer, fix runtests.vcxproj file. 2017-06-17 12:05:48 -04:00
Sebastian Pipping
82b8241c1c Changes: Add link for SipHash commits 2017-06-17 17:44:32 +02:00
Sebastian Pipping
508b1c3023 Changes: Add reference to SipHash ticket 2017-06-17 12:04:41 +02:00
Sebastian Pipping
e421621fb3 win32/expat.iss: Install AUTHORS file, too 2017-06-17 12:02:29 +02:00
Sebastian Pipping
484cc4e62c Bump version, year, and ID for 2.2.1
Also fill earliest release date
2017-06-17 01:58:05 +02:00
Sebastian Pipping
d7ba4e385e Changes: Mention address leak, add MOX-??? references 2017-06-17 01:44:00 +02:00
Sebastian Pipping
b6742eb325 Bump version info from 7:2:6 to 7:3:6 2017-06-17 01:12:35 +02:00
Sebastian Pipping
c2d4688d5b Changes: Mention SipHash 2017-06-17 01:10:11 +02:00
Sebastian Pipping
1ee8601f24 Merge branch 'siphash' 2017-06-17 01:04:09 +02:00
Sebastian Pipping
01bbdedb66 Changes: Add CVE-2017-9233 info to change log 2017-06-17 01:00:45 +02:00
Rhodri James
c4bf96bb51 xmlparse.c: Fix external entity infinite loop bug (CVE-2017-9233) 2017-06-17 01:00:05 +02:00
Rhodri James
774ee6c15b Tests: Cover external entity infinite loop bug 2017-06-17 01:00:05 +02:00
Sebastian Pipping
13a55ba351 Changes: Add call for help 2017-06-17 00:56:27 +02:00
Sebastian Pipping
fa1bda5cd0 Add AUTHORS file
$ git log | fgrep Author: | sed 's, <[^>]\+>,,' | sort | uniq -c | awk '{ if (int($1) >= 20) print }' | sed 's,.*: ,,' | sort
2017-06-17 00:48:03 +02:00
Sebastian Pipping
913851a90c Remove amigaconfig.h and macconfig.h (issue #14) 2017-06-16 21:06:16 +02:00
Sebastian Pipping
760077feeb xmlparse.c: Polish ENTROPY_DEBUG
The cast fixes a compile warning.
2017-06-16 20:48:53 +02:00
Sebastian Pipping
c235f0aa43 MinGW: No longer ignore expat_config.h
Previously, "#define XML_CONTEXT_BYTES 1024" from winconfig.h
would render --disable-xml-context ineffective.
2017-06-16 20:38:52 +02:00
Sebastian Pipping
2446329958 Address MemorySanitizer mis-report on SYS_getrandom 2017-06-15 23:45:44 +02:00