summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlteo <>2014-04-18 18:07:59 +0000
committerlteo <>2014-04-18 18:07:59 +0000
commita7f3dcb706493d11b733db28ed4a9f4ba0365dc9 (patch)
tree8c12cf18d2f8389bce321adc334ea73c1a9f0133
parented154a7330556a4c5476c601c36a41f0c129b792 (diff)
downloadopenbsd-a7f3dcb706493d11b733db28ed4a9f4ba0365dc9.tar.gz
openbsd-a7f3dcb706493d11b733db28ed4a9f4ba0365dc9.tar.bz2
openbsd-a7f3dcb706493d11b733db28ed4a9f4ba0365dc9.zip
Check the return value of make_config_name() before attempting to use
the config filename. ok beck@
-rw-r--r--src/lib/libssl/src/apps/openssl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/libssl/src/apps/openssl.c b/src/lib/libssl/src/apps/openssl.c
index 9f01e3c576..008bbdc08b 100644
--- a/src/lib/libssl/src/apps/openssl.c
+++ b/src/lib/libssl/src/apps/openssl.c
@@ -258,8 +258,13 @@ main(int Argc, char *ARGV[])
258 p = getenv("OPENSSL_CONF"); 258 p = getenv("OPENSSL_CONF");
259 if (p == NULL) 259 if (p == NULL)
260 p = getenv("SSLEAY_CONF"); 260 p = getenv("SSLEAY_CONF");
261 if (p == NULL) 261 if (p == NULL) {
262 p = to_free = make_config_name(); 262 p = to_free = make_config_name();
263 if (p == NULL) {
264 BIO_printf(bio_err, "error making config file name\n");
265 goto end;
266 }
267 }
263 268
264 default_config_file = p; 269 default_config_file = p;
265 270