summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorkinichiro <kinichiro.inoguchi@gmail.com>2019-12-11 21:12:53 +0900
committerPauli <paul.dale@oracle.com>2019-12-13 13:39:31 +1000
commitdd0139f416257ec5632414ed3ad8c61d07ba07ec (patch)
treee19d65a4f194c15a443bbace193dc3656762cbb6 /apps
parentebe19ab86c0faf3f02b0c30d8da0d1cadb0fb33a (diff)
Check return value after loading config file
CLA: trivial Reviewed-by: Paul Yang <kaishen.yy@antfin.com> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10607)
Diffstat (limited to 'apps')
-rw-r--r--apps/req.c6
-rw-r--r--apps/ts.c3
2 files changed, 6 insertions, 3 deletions
diff --git a/apps/req.c b/apps/req.c
index b084f108bd..76bbbeb555 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -476,12 +476,14 @@ int req_main(int argc, char **argv)
if (verbose)
BIO_printf(bio_err, "Using configuration from %s\n", template);
- req_conf = app_load_config(template);
+ if ((req_conf = app_load_config(template)) == NULL)
+ goto end;
if (addext_bio) {
if (verbose)
BIO_printf(bio_err,
"Using additional configuration from command line\n");
- addext_conf = app_load_config_bio(addext_bio, NULL);
+ if ((addext_conf = app_load_config_bio(addext_bio, NULL)) == NULL)
+ goto end;
}
if (template != default_config_file && !app_load_modules(req_conf))
goto end;
diff --git a/apps/ts.c b/apps/ts.c
index 196e97b9b0..c651c8e5cd 100644
--- a/apps/ts.c
+++ b/apps/ts.c
@@ -293,7 +293,8 @@ int ts_main(int argc, char **argv)
goto end;
}
- conf = load_config_file(configfile);
+ if ((conf = load_config_file(configfile)) == NULL)
+ goto end;
if (configfile != default_config_file && !app_load_modules(conf))
goto end;