From d3648ebb04b650e6d20a2ec1fb839256b30b9fc6 Mon Sep 17 00:00:00 2001
From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Date: Sun, 26 Jan 2014 20:03:50 +0100
Subject: [PATCH] fixed null pointer derefence when printing a name and an LDAP
description isn't present for the OID
Conflicts:
lib/x509/common.c
---
lib/x509/common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/x509/common.c b/lib/x509/common.c
index 59b7e93..f761b25 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++;
}
--
1.9.0