[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 02/04: MHD_create_response_from_iovec(): more portable b
From: |
gnunet |
Subject: |
[libmicrohttpd] 02/04: MHD_create_response_from_iovec(): more portable behavior |
Date: |
Sun, 18 Apr 2021 19:49:53 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 17934e4ebf550d3df5abe785bbdee34fd0c4b61b
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Apr 18 14:18:01 2021 +0300
MHD_create_response_from_iovec(): more portable behavior
Reject responses larger than SSIZE_MAX as they could be rejected
by sendmsg()
---
src/microhttpd/response.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index 5dcdca18..ab8a56e8 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -895,7 +895,7 @@ MHD_create_response_from_iovec (const struct MHD_IoVec *iov,
}
if ( (total_size > (total_size + iov[i].iov_len)) ||
(INT_MAX == i_cp) ||
- (SSIZE_MAX < iov[i].iov_len) )
+ (SSIZE_MAX < (total_size + iov[i].iov_len)) )
{
i_cp = -1; /* overflow */
break;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.