提交 5fe82100 编写于 作者: K kinichiro 提交者: Pauli

Check return value after loading config file

CLA: trivial
Reviewed-by: NPaul Yang <kaishen.yy@antfin.com>
Reviewed-by: NPaul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/10607)

(cherry picked from commit dd0139f416257ec5632414ed3ad8c61d07ba07ec)
上级 7a930005
...@@ -435,12 +435,14 @@ int req_main(int argc, char **argv) ...@@ -435,12 +435,14 @@ int req_main(int argc, char **argv)
if (verbose) if (verbose)
BIO_printf(bio_err, "Using configuration from %s\n", template); 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 (addext_bio) {
if (verbose) if (verbose)
BIO_printf(bio_err, BIO_printf(bio_err,
"Using additional configuration from command line\n"); "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)) if (template != default_config_file && !app_load_modules(req_conf))
goto end; goto end;
......
...@@ -282,7 +282,8 @@ int ts_main(int argc, char **argv) ...@@ -282,7 +282,8 @@ int ts_main(int argc, char **argv)
goto end; 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)) if (configfile != default_config_file && !app_load_modules(conf))
goto end; goto end;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册