From: Tim Rühsen Date: Wed, 9 Oct 2019 16:54:12 +0000 (+0200) Subject: lib/x509/x509.c: Check before pointer dereference in get_alt_name() X-Git-Tag: gnutls_3_6_11~32^2~2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=21883fcb90dd35a2c4d8e8a005802667615fd345;p=thirdparty%2Fgnutls.git lib/x509/x509.c: Check before pointer dereference in get_alt_name() Fixes Coverity issue 1361513 Signed-off-by: Tim Rühsen --- diff --git a/lib/x509/x509.c b/lib/x509/x509.c index 776ca3e1e2..62e7abe8e9 100644 --- a/lib/x509/x509.c +++ b/lib/x509/x509.c @@ -1817,7 +1817,7 @@ get_alt_name(gnutls_subject_alt_names_t san, goto cleanup; } - if (othername_oid && type == GNUTLS_SAN_OTHERNAME) { + if (othername_oid && type == GNUTLS_SAN_OTHERNAME && ooid.data) { unsigned vtype; ret = gnutls_x509_othername_to_virtual((char*)ooid.data, &oname, &vtype, &virt); if (ret >= 0) {