changeset 23310:f3b7a07a7607

A patch from toofishes to fix a crash. Fixes #6036
author Richard Laager <rlaager@wiktel.com>
date Sat, 07 Jun 2008 01:58:23 +0000
parents 99b4470a763e
children ea341703b1d3
files libpurple/certificate.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/certificate.c	Sat Jun 07 00:00:34 2008 +0000
+++ b/libpurple/certificate.c	Sat Jun 07 01:58:23 2008 +0000
@@ -787,8 +787,7 @@
 
 	for (cur = lst; cur; cur = cur->next) {
 		x509_ca_element *el = cur->data;
-		/* TODO: Unsafe? */
-		if ( !strcmp(dn, el->dn) ) {
+		if (el->dn && !strcmp(dn, el->dn)) {
 			return el;
 		}
 	}