mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-29 04:09:31 +03:00
MHD_create_response_from_iovec(): more portable behavior
Reject responses larger than SSIZE_MAX as they could be rejected by sendmsg()
This commit is contained in:
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user