[gnutls-devel] GnuTLS | Remove trailing dot from hostname input (!709)

Tim Rühsen gitlab at mg.gitlab.com
Sun Jul 22 12:54:12 CEST 2018

Tim Rühsen commented on a discussion on src/cli.c:

>  		ssh = strictssh;
>  	}
> -	else
> +		canonicalize_host((char *) host, NULL, 0);

OPT_ARG resolves to a 'const char *' (`argString` in `opt_arg_union_t`).

So what you propose makes it even more ugly.

To avoid the cast we can
- make host a char array, wide enough for hostnames (the pro would be a size limit on the input)
- use strdup()
- ask autoconf to remove the const from `argString`

Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/709#note_89512456
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/20180722/b0ec3eb0/attachment-0001.html>

More information about the Gnutls-devel mailing list