Commit Graph

532 Commits

Author SHA1 Message Date
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
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