From 3770b988c0cd5b15c7bc8e70d75a02784b651a0f Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 10 Feb 2012 19:54:54 +0000 Subject: [PATCH] PR: 2710 Submitted by: Tomas Mraz Check return codes for load_certs_crls. --- apps/apps.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/apps.c b/apps/apps.c index b9df6f9e2d..9eff4efb50 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -1215,7 +1215,8 @@ STACK_OF(X509) *load_certs(BIO *err, const char *file, int format, const char *pass, ENGINE *e, const char *desc) { STACK_OF(X509) *certs; - load_certs_crls(err, file, format, pass, e, desc, &certs, NULL); + if (!load_certs_crls(err, file, format, pass, e, desc, &certs, NULL)) + return NULL; return certs; } @@ -1223,7 +1224,8 @@ STACK_OF(X509_CRL) *load_crls(BIO *err, const char *file, int format, const char *pass, ENGINE *e, const char *desc) { STACK_OF(X509_CRL) *crls; - load_certs_crls(err, file, format, pass, e, desc, NULL, &crls); + if (!load_certs_crls(err, file, format, pass, e, desc, NULL, &crls)) + return NULL; return crls; } -- 2.40.0