[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] branch master updated: MHD_send_hdr_and_body_: minor fix
From: |
gnunet |
Subject: |
[libmicrohttpd] branch master updated: MHD_send_hdr_and_body_: minor fixes for W32 |
Date: |
Wed, 16 Dec 2020 18:17:48 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new d87dcd83 MHD_send_hdr_and_body_: minor fixes for W32
d87dcd83 is described below
commit d87dcd8309e2d3a426fc9354f59337710071ef9c
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Dec 16 20:17:14 2020 +0300
MHD_send_hdr_and_body_: minor fixes for W32
---
src/microhttpd/mhd_send.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 3e5a4ab7..38a8a499 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -862,6 +862,9 @@ MHD_send_hdr_and_body_ (struct MHD_Connection *connection,
(0 == body_size) ||
((size_t) SSIZE_MAX <= header_size) ||
((size_t) _MHD_SEND_VEC_MAX < header_size)
+#ifdef _WIN32
+ || ((size_t) UINT_MAX < header_size)
+#endif /* _WIN32 */
#else /* ! _MHD_USE_SEND_VEC */
true
#endif /* ! _MHD_USE_SEND_VEC */
@@ -916,7 +919,7 @@ MHD_send_hdr_and_body_ (struct MHD_Connection *connection,
if (((size_t) _MHD_SEND_VEC_MAX <= body_size) ||
((size_t) _MHD_SEND_VEC_MAX < (header_size + body_size)))
{
- /* Send value limit */
+ /* Send total amount limit */
body_size = _MHD_SEND_VEC_MAX - header_size;
complete_response = false;
push_body = complete_response;
@@ -947,6 +950,13 @@ MHD_send_hdr_and_body_ (struct MHD_Connection *connection,
#endif /* HAVE_WRITEV */
#endif /* HAVE_SENDMSG || HAVE_WRITEV */
#ifdef _WIN32
+ if ((size_t) UINT_MAX < body_size)
+ {
+ /* Send item size limit */
+ body_size = UINT_MAX;
+ complete_response = false;
+ push_body = complete_response;
+ }
vector[0].buf = (char *) header;
vector[0].len = (unsigned long) header_size;
vector[1].buf = (char *) body;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libmicrohttpd] branch master updated: MHD_send_hdr_and_body_: minor fixes for W32,
gnunet <=