gnunet-svn
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]