Christian Grothoff
fdfd5dc80f
tbrehm@dspace.de wrote:
...
Hi,
gcc10 complains with two warnings when compiling libmicrohttpd using
#define NDEBUG 1
#define DAUTH_SUPPORT 1
so, "release build" with enabled "digest authentication":
../digestauth.c: In function 'MHD_digest_auth_check_digest2':
../digestauth.c:1287:9: warning: 'da.digest_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
1287 | if (da.digest_size != digest_size)
| ~~^~~~~~~~~~~~
../digestauth.c: In function 'MHD_queue_auth_fail_response2':
../digestauth.c:1361:55: warning: 'da.digest_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
1361 | char nonce[NONCE_STD_LEN (VLA_ARRAY_LEN_DIGEST (da.digest_size)) + 1];
|
This is a minor issue, without any practical effect, unless when calling the MHD API with an invalid value for the MHD_DigestAuthAlgorithm enum.
However, gcc is still right that there is a potential code path with undefined behaviour: the default-case in the switch statement in SETUP_DA does not set "da.digest_size".
Two functions later still always read this value. And the "mhd_assert" has no effect, since it's disabled when NDEBUG is set.
Trivial patch attached to silence the compiler warnings by also initializing "da.digest_size" in the default case of the switch statement:
2021-09-03 13:31:05 +02:00
Evgeny Grin (Karlson2k)
201444ffb1
Improved 'configure' report after e163ad95a7
2021-09-02 16:11:26 +03:00
Evgeny Grin (Karlson2k)
e163ad95a7
Disabled parallel make for curltest if heavy tests are enabled
2021-09-02 16:09:34 +03:00
Evgeny Grin (Karlson2k)
849b9eebc1
configure: limit number of CPU cores used without heavy testing
2021-09-02 16:08:35 +03:00
Evgeny Grin (Karlson2k)
f602bab6f6
mhd_limits.h: removed wrong alternative for SSIZE_MAX
2021-09-02 14:59:16 +03:00
Evgeny Grin (Karlson2k)
7be09c4512
Fixed possible preprocessor error if ULLONG_MAX is not digits-only
2021-09-02 14:58:10 +03:00
Evgeny Grin (Karlson2k)
d8cc7c50f0
mhd_limits.h: fixed copy-paste error in comment
2021-09-02 14:57:17 +03:00
Evgeny Grin (Karlson2k)
6b83caccb3
mhd_limits.h: use alternative name for ULLONG_MAX if available
2021-09-02 14:56:37 +03:00
Evgeny Grin (Karlson2k)
9f333edbdf
Fixed possible preprocessor error when SIZE_MAX is not digits-only
2021-09-02 10:45:38 +03:00
Evgeny Grin (Karlson2k)
aaab73802c
Fixed possible preprocessor errors
2021-09-02 10:45:38 +03:00
Christian Grothoff
0920a1f908
-fix typo
2021-09-01 18:23:40 +02:00
Evgeny Grin (Karlson2k)
b6f083d884
Fixed preprocessor error, fixed timeout calculation
...
with 64 bit time_t introduced by e42ec8f54d
2021-09-01 19:17:25 +03:00
Evgeny Grin (Karlson2k)
99f31f0547
configure: added stdint.h to the list of required headers
2021-09-01 11:18:22 +03:00
Evgeny Grin (Karlson2k)
2452f03c3f
configure: removed sys/types.h duplicated check
2021-09-01 11:03:05 +03:00
Evgeny Grin (Karlson2k)
b21d5bbac1
configure: moved sys/stat.h to optional headers
...
sys/stat.h is not actually used by MHD code at the moment
2021-09-01 10:57:20 +03:00
Evgeny Grin (Karlson2k)
6942c69240
configure: removed check for unused locale.h header
2021-09-01 10:50:55 +03:00
Evgeny Grin (Karlson2k)
2ec7a17a59
configure: removed check for unused math.h header
2021-09-01 10:48:32 +03:00
Evgeny Grin (Karlson2k)
f66a23d271
Guard stddef.h includes with '#ifdef HAVE_STDDEF_H'
2021-09-01 10:47:40 +03:00
Evgeny Grin (Karlson2k)
a64a0ac77e
Test for stdlib.h presence
2021-09-01 10:19:16 +03:00
Evgeny Grin (Karlson2k)
ec09d0a88b
mhd_mono_clock: clarified doxy
2021-09-01 09:07:48 +03:00
Evgeny Grin (Karlson2k)
e42ec8f54d
Switched internal timers to milliseconds resolutions.
...
This is needed to handle connection timeouts precisely.
* Fixed connections expired "just before or after" required timeout
* Fixed busy-waiting with low-resolution system timers when connection is
about to timeout. Now low-resolution timers are handled automatically.
* Added log message if application tries to set ridiculously large timeout
2021-08-30 21:13:54 +03:00
Evgeny Grin (Karlson2k)
510881918a
test_shutdown_select: file description fixed
2021-08-30 18:13:54 +03:00
Evgeny Grin (Karlson2k)
17d8406e6c
get_date_str(): added error check
2021-08-30 17:46:48 +03:00
Evgeny Grin (Karlson2k)
3e67830011
microhttpd.h: removed duplicated macro
2021-08-30 17:21:55 +03:00
Evgeny Grin (Karlson2k)
e544cf3630
Added fallback functions for MHD_monotonic_msec_counter() values
2021-08-29 22:07:13 +03:00
Evgeny Grin (Karlson2k)
cc650acad6
MHD_monotonic_msec_counter(): fixed internal fallback
2021-08-29 19:09:31 +03:00
Evgeny Grin (Karlson2k)
c9d390f42d
test_timeout: improved: added more error detection and reporting
2021-08-29 18:01:32 +03:00
Evgeny Grin (Karlson2k)
8395ad601e
Fixed support for custom connection timeouts in Thread-Per-Connection mode
2021-08-27 18:14:06 +03:00
Evgeny Grin (Karlson2k)
5437bfdf9c
MHD_monotonic_msec_counter(): added new internal function
2021-08-27 12:53:09 +03:00
Evgeny Grin (Karlson2k)
cd6f8668cd
mhd_mono_clock: simplified calculations on old W32 platforms
2021-08-27 11:36:25 +03:00
Evgeny Grin (Karlson2k)
40f7a33a09
mhd_mono_clock: updated clock IDs
2021-08-27 11:34:35 +03:00
Evgeny Grin (Karlson2k)
0e85520a9b
Updated .gitignore
2021-08-26 17:24:45 +03:00
Evgeny Grin (Karlson2k)
5929f53ef8
src/testcurl/https/Makefile.am: removed non-existing include dir
2021-08-26 16:21:24 +03:00
Evgeny Grin (Karlson2k)
78b86d29f1
curl_version_check: mark function as static
2021-08-26 16:20:49 +03:00
Evgeny Grin (Karlson2k)
143eb48f21
Moved test help file
2021-08-26 16:15:05 +03:00
Evgeny Grin (Karlson2k)
f53fa957fc
test_timeout: fixed dead assigment
2021-08-26 16:14:27 +03:00
Evgeny Grin (Karlson2k)
f126592e0f
test_quiesce: fixed dead assignment
2021-08-25 22:03:38 +03:00
Evgeny Grin (Karlson2k)
7d8babba48
test_post: fixed test error report
2021-08-25 22:03:14 +03:00
Evgeny Grin (Karlson2k)
75da17cbd0
test_get_close_keep_alive: mute static analyzer
2021-08-25 21:56:04 +03:00
Evgeny Grin (Karlson2k)
4ef771a1a7
test_postprocessor_md: test all returned values
2021-08-25 21:28:15 +03:00
Evgeny Grin (Karlson2k)
09c4a22975
websocket_threaded_example: fix static analyzer error
2021-08-25 20:50:07 +03:00
Evgeny Grin (Karlson2k)
46c0d3f470
querystring_example: free memory with new error check
2021-08-25 20:33:51 +03:00
Evgeny Grin (Karlson2k)
0497e9c801
tlsauthentication.c: better fix for compiler warning
2021-08-25 20:22:57 +03:00
Evgeny Grin (Karlson2k)
40501c2f5d
tlsauthentication.c: inelegant mute of compiler warning
2021-08-25 19:55:06 +03:00
Evgeny Grin (Karlson2k)
5feee053a2
querystring_example: fixed compiler warning, added error checking
2021-08-25 19:40:43 +03:00
Evgeny Grin (Karlson2k)
d478fcfb48
connection.c: Ensure that variable is initialized
2021-08-25 17:17:41 +03:00
Christian Grothoff
79868fab86
-typo
2021-08-24 15:17:01 +02:00
Evgeny Grin (Karlson2k)
8361a3a7b7
Inherit non-blocking status when accepting on most platforms
...
When accept() is used, socket non-blocking flag is inherited from listen
socket almost on all platforms (except Linux kernel).
Actually modern platforms use accept4() so this change is mostly for W32.
2021-08-24 16:06:11 +03:00
Evgeny Grin (Karlson2k)
c556824313
Added flag for non-blocking listen socket
2021-08-24 16:06:11 +03:00
Evgeny Grin (Karlson2k)
4371815fc7
MHD_accept_connection: refactoring to improve readability
2021-08-24 16:06:10 +03:00