[gnutls-devel] GnuTLS | Sockets: implement sendmsg()-like function on Win32 (!1377)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Mon Feb 15 19:56:48 CET 2021
Evgeny Grin commented on a discussion on lib/system/sockets.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1377#note_509556788
> + bufs[to_send_cnt].buf = iovec[to_send_cnt].iov_base;
> + bufs[to_send_cnt].len = (unsigned long)
> + (space_left > ULONG_MAX ?
> + ULONG_MAX : space_left);
> + ovrflwn = true;
> + }
> + else if (iovec[to_send_cnt].iov_len > ULONG_MAX) {
> + bufs[to_send_cnt].buf = iovec[to_send_cnt].iov_base;
> + bufs[to_send_cnt].len = ULONG_MAX;
> + ovrflwn = true;
> + }
> + else {
> + bufs[to_send_cnt].buf = iovec[to_send_cnt].iov_base;
> + bufs[to_send_cnt].len =
> + (unsigned long) iovec[to_send_cnt].iov_len;
> + to_send_bytes += iovec[to_send_cnt].iov_len;
`WSASend()` can send more than `SSIZE_MAX` on x32 Windows. The problem is GnuTLS will unable to process this value, as return value could be negative when casted to `ssize_t`.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1377#note_509556788
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20210215/f33f9783/attachment-0001.html>
More information about the Gnutls-devel
mailing list