[gnutls-devel] GnuTLS | improve gnutls-serv EOL processing (!1314)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Sat Aug 29 19:21:23 CEST 2020




Albrecht Dreß commented on a discussion on src/serv.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1314#note_404203938

>  			*response = peer_print_data(session, response_length);
>  	} else {
>  		int ret;
> -		strip(request);
> +		if (strip_crlf != 0)
> +			strip(request);
>  		fprintf(stderr, "received cmd: %s\n", request);

@airtower-luna noted:
> Not calling strip() will effectively add a newline here

I don't think so…

`strip(request)` replaces the first occurrence of the sequence `\r\n\0` in `request` by `\n\0\0`.  When running in echo mode, this breaks peers which expect the transmitted message being bounced back *without* modification.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1314#note_404203938
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/20200829/b43e5f22/attachment-0001.html>


More information about the Gnutls-devel mailing list