]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
fixed null pointer derefence when printing a name and an LDAP description isn't prese...
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 26 Jan 2014 19:03:50 +0000 (20:03 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 26 Jan 2014 19:03:50 +0000 (20:03 +0100)
lib/x509/common.c

index e05ae369012f34703af02c65d2a21f652039c8d1..628356dbebec3c118975d07e4c9195e57ce3318e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003-2012 Free Software Foundation, Inc.
+ * Copyright (C) 2003-2014 Free Software Foundation, Inc.
  *
  * Author: Nikos Mavrogiannopoulos
  *
@@ -251,7 +251,7 @@ const char *gnutls_x509_dn_oid_name(const char *oid, unsigned int flags)
        unsigned int i = 0;
 
        do {
-               if (strcmp(_oid2str[i].oid, oid) == 0)
+               if (strcmp(_oid2str[i].oid, oid) == 0 && _oid2str[i].ldap_desc != NULL)
                        return _oid2str[i].ldap_desc;
                i++;
        }