]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
lib/x509/x509.c: Check before pointer dereference in get_alt_name()
authorTim Rühsen <tim.ruehsen@gmx.de>
Wed, 9 Oct 2019 16:54:12 +0000 (18:54 +0200)
committerTim Rühsen <tim.ruehsen@gmx.de>
Sun, 13 Oct 2019 10:27:19 +0000 (12:27 +0200)
Fixes Coverity issue 1361513

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
lib/x509/x509.c

index 776ca3e1e26846667c9ba02789deb0db25c5342a..62e7abe8e9a7721224ec13563df80b063d886666 100644 (file)
@@ -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) {