[gnutls-devel] GnuTLS | Fix coverity in lib/ (!1092)
Development of GNU's TLS library
gnutls-devel at lists.gnutls.org
Fri Oct 11 21:12:40 CEST 2019
Tim Rühsen commented on a discussion on lib/x509/x509.c: https://gitlab.com/gnutls/gnutls/merge_requests/1092#note_229519797
> 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) {
ooid.data is only set under certain conditions in gnutls_subject_alt_names_get(). So I think (and Coverity also does) that checking ooid.data instead of type == GNUTLS_SAN_OTHERNAME is the better approach.
Of course, we can check both if that makes reading and understanding easier.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/1092#note_229519797
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/20191011/61e140ca/attachment.html>
More information about the Gnutls-devel
mailing list