[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 11/13: mhd_send: added safe default value if sysconf() i
From: |
gnunet |
Subject: |
[libmicrohttpd] 11/13: mhd_send: added safe default value if sysconf() is broken |
Date: |
Wed, 27 Apr 2022 21:25:19 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 28a67e3db49a25040e80e0d14bb38b8e64ae71b0
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Apr 27 21:04:24 2022 +0300
mhd_send: added safe default value if sysconf() is broken
---
src/microhttpd/mhd_send.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 84c9c06e..c607a4c8 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -126,10 +126,14 @@ iov_max_init_ (void)
long res = sysconf (_SC_IOV_MAX);
if (res >= 0)
mhd_iov_max_ = (unsigned long) res;
-#if defined(IOV_MAX)
else
+ {
+#if defined(IOV_MAX)
mhd_iov_max_ = IOV_MAX;
-#endif /* IOV_MAX */
+#else /* ! IOV_MAX */
+ mhd_iov_max_ = 8; /* Should be the safe limit */
+#endif /* ! IOV_MAX */
+ }
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] 04/13: thread-per-connection: do not cache connection timeout, (continued)
- [libmicrohttpd] 04/13: thread-per-connection: do not cache connection timeout, gnunet, 2022/04/27
- [libmicrohttpd] 03/13: Response from callback: do allow negative return amounts, except predefined values, gnunet, 2022/04/27
- [libmicrohttpd] 01/13: MHD_itc_clear_(): simplified eventfd version, gnunet, 2022/04/27
- [libmicrohttpd] 08/13: Added new function MHD_get_timeout64s(), gnunet, 2022/04/27
- [libmicrohttpd] 02/13: Fixed compiler warnings of implicit casting, which could change the value, gnunet, 2022/04/27
- [libmicrohttpd] 06/13: Added new function MHD_get_timeout64(), gnunet, 2022/04/27
- [libmicrohttpd] 09/13: daemon: added workaround for 'uncrustify' broken formatting, gnunet, 2022/04/27
- [libmicrohttpd] 07/13: get_timeout_millisec_(): refactoring for readability, gnunet, 2022/04/27
- [libmicrohttpd] 05/13: thread-per-connection: improved timeout handling for 'poll()' mode, fixed short busy-waiting, gnunet, 2022/04/27
- [libmicrohttpd] 10/13: Use new function MHD_get_timeout64() in MHD code, gnunet, 2022/04/27
- [libmicrohttpd] 11/13: mhd_send: added safe default value if sysconf() is broken,
gnunet <=
- [libmicrohttpd] 12/13: Fixes related to implicit cast warnings, gnunet, 2022/04/27
- [libmicrohttpd] 13/13: MHD_get_timeout*(): improved doxy, gnunet, 2022/04/27