# HG changeset patch # User Andre Heinecke # Date 1396979255 0 # Node ID 81a205fc651e104d9b3b3c1f440b74dfba58963c # Parent 455d6d00e8960510561fc92a67c7b59ee1c52d98 Do not exit on error diff -r 455d6d00e896 -r 81a205fc651e cinst/mozilla.c --- a/cinst/mozilla.c Tue Apr 08 15:09:13 2014 +0000 +++ b/cinst/mozilla.c Tue Apr 08 17:47:35 2014 +0000 @@ -370,6 +370,11 @@ size_t name_len; cn_str = x509_parse_subject(secitemp->data, secitemp->len, CERT_OID_CN); o_str = x509_parse_subject(secitemp->data, secitemp->len, CERT_OID_O); + if (!cn_str || !o_str) + { + DEBUGPRINTF("FATAL: Could not parse certificate!"); + exit(ERR_INVALID_CERT); + } name_len = strlen(cn_str) + strlen(o_str) + 4; name = (char *)xmalloc(name_len); snprintf(name, name_len, "%s - %s", cn_str, o_str); diff -r 455d6d00e896 -r 81a205fc651e common/certhelp.c --- a/common/certhelp.c Tue Apr 08 15:09:13 2014 +0000 +++ b/common/certhelp.c Tue Apr 08 17:47:35 2014 +0000 @@ -33,8 +33,8 @@ x509_crt_init(&chain); if (x509_crt_parse_der(&chain, derdata, derlen) != 0) { - DEBUGPRINTF("FATAL: Could not parse certificate!"); - exit(ERR_INVALID_CERT); + ERRORPRINTF("Could not parse certificate!\n"); + return NULL; } else {