[gnutls-devel] GnuTLS | sockets: fixed building for Windows with compilers without VLA support (alternative version) (!1490)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Fri Nov 26 17:03:50 CET 2021




Evgeny Grin commented on a discussion on lib/system/sockets.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1490#note_745152847

>  system_writev(gnutls_transport_ptr_t ptr, const giovec_t * iovec,
>  	      int iovec_cnt)
>  {
> -	WSABUF bufs[iovec_cnt];
> +	WSABUF bufs[32];
>  	DWORD bytes_sent;
>  	int to_send_cnt = 0;
>  	size_t to_send_bytes = 0;
>  
> -	while (to_send_cnt < iovec_cnt && to_send_bytes < SSIZE_MAX) {
> +	while (to_send_cnt < iovec_cnt &&
> +			(size_t) to_send_cnt < sizeof(bufs) / sizeof(bufs[0]) &&

MR has been updated.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1490#note_745152847
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/20211126/cac7dc10/attachment.html>


More information about the Gnutls-devel mailing list