]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Added check for null
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 19 Feb 2014 13:03:46 +0000 (14:03 +0100)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 19 Feb 2014 13:03:46 +0000 (14:03 +0100)
lib/x509/extensions.c

index 5b2da0e38c7d53ee9da33dc4ad875cea09a0eb6e..7bd8571bf1263e497da739b94bf1a127b2e5c191 100644 (file)
@@ -829,6 +829,9 @@ _gnutls_write_general_name(ASN1_TYPE ext, const char *ext_name,
        int result;
        char name[128];
 
+       if (data == NULL)
+               return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST);
+
        switch (type) {
        case GNUTLS_SAN_DNSNAME:
                str = "dNSName";