From: Nikos Mavrogiannopoulos Date: Sun, 26 Jan 2014 19:03:50 +0000 (+0100) Subject: fixed null pointer derefence when printing a name and an LDAP description isn't prese... X-Git-Tag: gnutls_3_3_0pre0~258 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=309167ee74ea0d84ad42f05b89a37e3a366ced4e;p=thirdparty%2Fgnutls.git fixed null pointer derefence when printing a name and an LDAP description isn't present for the OID --- diff --git a/lib/x509/common.c b/lib/x509/common.c index e05ae36901..628356dbeb 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 * @@ -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++; }