From: Nikos Mavrogiannopoulos Date: Sat, 28 Jun 2003 05:51:47 +0000 (+0000) Subject: Corrected a null pointer dereference in gnutls_certificate_get_ours(). Report and... X-Git-Tag: gnutls_0_9_6~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8fa03df35ff7d60893e433c0de65b044758e22b6;p=thirdparty%2Fgnutls.git Corrected a null pointer dereference in gnutls_certificate_get_ours(). Report and Patch by Steve Langasek. --- diff --git a/lib/gnutls_ui.c b/lib/gnutls_ui.c index d2816e4a9e..814d3f1463 100644 --- a/lib/gnutls_ui.c +++ b/lib/gnutls_ui.c @@ -201,7 +201,7 @@ const gnutls_datum *gnutls_certificate_get_ours(gnutls_session session) CHECK_AUTH(GNUTLS_CRD_CERTIFICATE, NULL); cred = _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); - if (cred == NULL) { + if (cred == NULL || cred->cert_list == NULL) { gnutls_assert(); return NULL; }