summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2014-01-26 20:03:50 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2014-01-26 20:06:03 +0100
commitd3648ebb04b650e6d20a2ec1fb839256b30b9fc6 (patch)
tree1089747c48923bb297e5f10da4da28677e410f88
parent1f0204d5d2535b980b0fffca6def185eeddec01e (diff)
downloadgnutls-d3648ebb04b650e6d20a2ec1fb839256b30b9fc6.tar.gz
fixed null pointer derefence when printing a name and an LDAP description isn't present for the OID
Conflicts: lib/x509/common.c
-rw-r--r--lib/x509/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/x509/common.c b/lib/x509/common.c
index 59b7e931c4..f761b25921 100644
--- a/lib/x509/common.c
+++ b/lib/x509/common.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2012 Free Software Foundation, Inc.
+ * Copyright (C) 2003-2014 Free Software Foundation, Inc.
*
* Author: Nikos Mavrogiannopoulos
*
@@ -242,7 +242,7 @@ gnutls_x509_dn_oid_name (const char *oid, unsigned int flags)
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++;
}