[gnutls-devel] GnuTLS | Fix coverity in lib/ (!1092)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Sat Oct 12 23:18:49 CEST 2019




Nikos Mavrogiannopoulos commented on a discussion on lib/x509/x509.c: https://gitlab.com/gnutls/gnutls/merge_requests/1092#note_229671610

>  		goto cleanup;
>  	}
>  
> -	if (othername_oid && type == GNUTLS_SAN_OTHERNAME) {
> +	/* ooid.data is only set if type == GNUTLS_SAN_OTHERNAME.
> +	 * We check ooid.data here instead of type to avoid false positives from
> +	 * static analyzers. See Coverity issue #1361513. */
> +	if (othername_oid && ooid.data) {

It may be that you are right, however that's risky code, as you depend on what `gnutls_subject_alt_names_get()` is currently doing internally. A refactor of it, and this unrelated code will break. I think the more conservative and safe we are, the better.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/1092#note_229671610
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/20191012/837c4e0e/attachment.html>


More information about the Gnutls-devel mailing list