[gnutls-devel] GnuTLS | gnutls-serv: Do not exit when a message to be echoed is received (!1222)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Tue Mar 24 13:28:56 CET 2020




Daiki Ueno started a new discussion on src/serv.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1222#note_310396186

>  			*response_length = strlen(*response);
>  			return 1;
>  		} else if (ret == 0) {
> +			*response = strdup(request);
>  			if (*response == NULL) {
>  				fprintf(stderr, "Memory error\n");
>  				return 0;
>  			}
> -			*response = strdup(request);
>  			*response_length = ((*response) ? strlen(*response) : 0);

This could be simplified as `*response == NULL` is already checked?

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1222#note_310396186
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/20200324/0175d77b/attachment.html>


More information about the Gnutls-devel mailing list