Commit Graph

543 Commits

Author SHA1 Message Date
Rhodri James
3278570027 Prevent XML_UNICODE being redefined 2017-08-29 22:30:32 +02:00
Sebastian Pipping
bc6468d230 xmlparse.c: Resolve superfluous internal malloc/realloc switch (#6) 2017-08-29 00:39:58 +02:00
Sebastian Pipping
448d79c02e xmltok.c: Use memcpy
Fixes false positive Clang (4.0.1) Static Analyzer warning (issue #9)
as a side-effect.
2017-08-28 22:21:10 +02:00
Sebastian Pipping
ab1cb1fa07 Add version comment to _INTERNAL_trim_to_complete_utf8_characters 2017-08-23 17:41:30 +02:00
Sebastian Pipping
8711ee3054 Leave no doubt about align_limit_to_full_utf8_characters being internal 2017-08-23 17:41:17 +02:00
Jose
a4321e4f29 Fix missing export symbol required by testsuite
Need to export the symbol align_limit_to_full_utf8_characters
to build the test suite on Windows.
2017-08-23 17:38:39 +02:00
Sebastian Pipping
b3db463e0d xmlparse.c|xmltok.c: Turn some comments to c89 style 2017-08-23 17:38:24 +02:00
Jose
b4b89c2ab0 Fix compile error with Visual Studio 2012
The standard header stdbool.h is not available
with old Visual Studio compilers
2017-08-23 17:38:24 +02:00
Benbuck Nason
e0b290eb3d Add artificial scopes in xmltok.c utf8_toUtf8() to fix c89 compilation. 2017-08-23 15:49:24 +02:00
Rhodri James
4af5450ebb Don't suppress default handler unnecessarily (Issue #11)
The roles XML_ROLE_DOCTYPE_PUBLIC_ID and XML_ROLE_DOCTYPE_SYSTEM_ID
fall through to XML_ROLE_ENTITY_PUBLIC_ID and XML_ROLE_ENTITY_SYSTEM_ID
respectively.  This lead to the default handler getting suppressed if
there was no start doctype declaration handler but there was an entity
declaration handler.
2017-08-23 00:36:20 +02:00
Rhodri James
77b5ae3bc3 Keep allocDefaultAtts consistent if allocating defaultAtts fails.
See issue #8
2017-08-23 00:20:28 +02:00
Alexander Bluhm
793c066953
Do not cast arguments of memcpy(3).
With an explicit cast, the C compiler does not check whether the
function's arguments are compatible and will just convert anything.
So removing the cast makes the code safer as the compiler will
complain in more cases.  The implicit cast does the correct thing.
2017-08-21 19:48:20 +02:00
Sebastian Pipping
3bdb11fc86 Prepare release version 2.2.4 (#123) 2017-08-19 16:40:21 +02:00
Sebastian Pipping
2cb09ae4da lib/Makefile.am: Install files AUTHORS and Changes, too 2017-08-15 22:09:59 +02:00
Sebastian Pipping
031e1df1fa loadlibrary.c: Mention license name and modifications (#116) 2017-08-12 21:31:32 +02:00
Sebastian Pipping
a704c940a4 Inline copyright headers with C/C++ code where missing (#116) 2017-08-12 21:02:41 +02:00
Sebastian Pipping
d4390f34f3 Replace handwritten Makefile with GNU Automake 2017-08-12 16:09:50 +02:00
Sebastian Pipping
74a7090a6e xmltok.c: Avoid copying of partial characters for UTF-8 input (#115)
Also make use of memcpy
Second take
2017-08-11 13:07:52 +02:00
Rolf Eike Beer
dc9c4d454a CMake: detect the presence of entropy functions 2017-08-05 22:23:59 +02:00
Sebastian Pipping
97c6bd0199 Prepare release version 2.2.3 2017-08-02 15:40:48 +02:00
Sebastian Pipping
cf5c6ffded loadlibrary.c: Address -Wempty-translation-unit 2017-08-02 13:34:46 +02:00
Sebastian Pipping
fd9581a34e Never require XML_POOR_ENTROPY for "./configure && make"
.. as XML_POOR_ENTROPY was intended to catch _accidental_
compilation with no provider of high quality entropy
enabled for _non-Autoconf_ build systems from the start.
2017-07-29 21:38:42 +02:00
Sebastian Pipping
7672f1ce96 Merge branch 'windows-curl-load-library' (pull request #101) 2017-07-29 15:26:10 +02:00
Sebastian Pipping
55839b633f xmlparse.c: Read /dev/urandom if non-blocking getrandom failed
This is in line with what recent Python does:

1) Calling getrandom with GRND_NONBLOCK
1abcf6700b/Python/bootstrap_hash.c (L594)

2) Reading /dev/urandom if getrandom failed
1abcf6700b/Python/bootstrap_hash.c (L503)
2017-07-26 20:41:37 +02:00
Sebastian Pipping
cfd6b138d6 xmlparse.c: Rename writeRandomBytes_getrandom to ..._nonblock
.. to better communicate the nature of that function
2017-07-26 20:35:52 +02:00
Chanho Park
e081e04ea0 Use GRND_NONBLOCK of getrandom call
Since the getrandom syscall patch(f356fb56fb Detect and support
syscall(SYS_getrandom, [..]) as well), some arm machine stuck during
systemd boot because the dbus uses the expat library and it hangs
inside the writeRandomBytes_getrandom function. Without the
GRND_NONBLOCK flag, the kernel will wait until the nonblocking_pool has
been initialized(See the getrandom syscall of the
linux/drivers/char/random.c). To prevent the blocking, we can add the
GRND_NONBLOCK flag and omit the comparison of the EAGAIN return.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
2017-07-26 20:35:52 +02:00
Sebastian Pipping
3e63f6c438 Rename Curl_load_library to _Expat_LoadLibrary
.. to avoid symbol collisions
2017-07-26 15:19:45 +02:00
Sebastian Pipping
6ea9606489 xmlparse.c: Use Curl_load_library 2017-07-26 15:07:49 +02:00
Sebastian Pipping
931697b9b8 Integrate loadlibrary.c into build systems 2017-07-26 15:03:55 +02:00
Sebastian Pipping
3c6c0b7ba9 loadlibrary.c: Strip down, make ready to use 2017-07-26 15:02:39 +02:00
Sebastian Pipping
c9951a41ce loadlibrary.c: Inline copyright notice
using text from
https://raw.githubusercontent.com/curl/curl/7fc0e1dfc475930eada0180ee552f7b6deb3f04e/COPYING

postprocessed with `par-format 73j | sed 's,^, * ,'`.
2017-07-26 15:02:15 +02:00
Sebastian Pipping
d1751bb60e Add unmodified system_win32.c of cURL as lib/loadlibrary.c
Exact revision / source:
f7df67cff0/lib/system_win32.c
2017-07-26 15:02:15 +02:00
Sebastian Pipping
27eaebc409 Document fix to use of SIPHASH_MAIN macro 2017-07-25 19:46:47 +02:00
Vadim Zeitlin
01a5c39218 Check for possibly undefined SIPHASH_MAIN using #ifdef
"#if SIPHASH_MAIN" results in -Wundef warning with recent gcc/clang and
this change suppresses it.
2017-07-25 16:17:31 +02:00
Sebastian Pipping
9a1ede8d14 Address warning about unused gather_time_entropy (#84)
.. with HAVE_ARC4RANDOM and/or HAVE_ARC4RANDOM_BUF defined
2017-07-25 00:59:20 +02:00
Rhodri James
7eb3cbcec6 Check UTF-16 endianness matches (Issue #86)
When an XML declaration specifies a UTF-16 encoding, check that
the endianness matches what the parser has already deduced.
2017-07-25 00:30:40 +02:00
Rhodri James
fe1adcaa84 Comment change: exclude error() role handler from coverage 2017-07-22 22:49:22 +02:00
Rhodri James
63dc602a12 Comment change: exclude unreachable case in prolog1 2017-07-22 22:49:21 +02:00
Rhodri James
3c8d9300f6 Comment change: exclude unreachable line from coverage figures 2017-07-22 22:49:20 +02:00
Rhodri James
7979e831ed Comment change: exclude sameName from coverage 2017-07-22 22:49:20 +02:00
Rhodri James
8be7b89885 Comment change: exclude paranoia check from coverage 2017-07-22 22:49:20 +02:00
Rhodri James
36e47058dc Comment change: exclude paranoia check from coverage 2017-07-22 22:49:20 +02:00
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