Commit Graph

501 Commits

Author SHA1 Message Date
Rhodri James
7c11f77a03 Comment change: exclude more unreachable code from coverage 2017-07-22 22:49:17 +02:00
Rhodri James
6fd7365bfb Comment change: exclude unreachable condition from coverage 2017-07-22 22:49:17 +02:00
Rhodri James
fc06a529a3 Reject multi-byte encodings with no converter function.
Not supplying a character encoding convert function when one was
needed previously caused a segfault if a multi-byte character was
encountered.  This errors at the start of parse instead.
2017-07-22 22:49:17 +02:00
Rhodri James
c2e90b3ebb Mark the second uppercasing in streqci() as unreacheable for coverage tests 2017-07-22 22:49:17 +02:00
Rhodri James
043e9923a3 Fix LCOV exclusion symbols in xmlparse.c 2017-07-22 22:49:16 +02:00
Rhodri James
5f06552ba3 Comment why negative blocksize in poolGrow is hard to test
Also add comment tags for lcov to ignore untestable code
2017-07-22 22:49:16 +02:00
Rhodri James
97aa338029 Comment why negative blocksize in poolGrow is hard to test
Add comment tags so lcov can ignore untestable code
2017-07-22 22:49:16 +02:00
Rhodri James
c6236c8a59 Comment why poolCopyStringN is not entered with an empty string pool
Also add comment tags so that lcov can ignore unreachable code.
2017-07-22 22:49:16 +02:00
Rhodri James
f8505ea55b Comment why an unbound prefix in getContext is believed impossible
Also add comment tags so that lcov can ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James
e35f05fb5f Comment why allocation failure in getContext is believe impossible.
Also add comment tags so lcov can ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James
d81e238f96 Comment why encoding change in reportDefault is believed never to happen
Also add comment tags so that lcov can ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James
fc3a968f47 Comment why default case in storeEntityValue is never executed
Also add comment tags so lcov can ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James
92cf2a3179 Remove unreachable error code in character ref handling 2017-07-22 22:49:16 +02:00
Rhodri James
10103bcd04 Comment why defaul case in appendAttreibuteValue is never executed
Also add comment tags so that lcov can ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James
f7229958bf Comment why encoding check in appendAttributeValue is never true
Also add comment tag so lcov can ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James
758e83d100 Remove unreachable error handling code in character ref handling 2017-07-22 22:49:16 +02:00
Rhodri James
ea51dfcbdb Comment why internal entity in param entity is believe impossible.
Also add comment tags to allow lcov to ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James
fc64cd121d Comment why external subset name lookup cannot fail
Also add comment tag so that lcov can ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James
d6549087b4 Remove unreachable code in entityValueInitProcessor 2017-07-22 22:49:16 +02:00
Rhodri James
e1a7cc2712 Comment why doIgnoreSection's default case is never called.
Also add comment tags so that lcov can ignore unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James
860933367a Comment why doIgnoreSection is believed to always use the parser's encoding
Also add comment tags so that lcov can ignore the unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James
5214e4427a Comment why doCdataSection's default case is never executed.
Also add comment tags so that lcov can ignore the unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James
766d6d3509 Comment why code in storeAtts() is never executed.
Also add comment tags so lcov can ignore the unreachable code
2017-07-22 22:49:16 +02:00
Rhodri James
351a8cb321 Comment why doContent's default case is never executed.
Also add comment markers so lcov can ignore the unreachable code.
2017-07-22 22:49:16 +02:00
Rhodri James
a420a3b8ef Comment why tidy-up parse cannot be suspended
Also add tags so that lcov can ignore the unreachable code.
2017-07-22 22:49:16 +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
Rhodri James
a7884ded31 Restore groupSize if (re)allocation of groupConnector fails 2017-07-16 23:02:30 +02:00
Rhodri James
c90f4bc24c Restore original nsAttsSize if reallocation fails 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
Sebastian Pipping
7c3eedb20b xmlparse.c: Adjust _GNU_SOURCE define in favor of Python (#77) 2017-07-12 23:55:49 +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
e72c42eb18 Prepare release version 2.2.2 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
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
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
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
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
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
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
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
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