diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-04-18 15:38:17 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-04-18 15:38:17 +0000 |
commit | b2370c002317fe4a29974f044162cc2f4c605830 (patch) | |
tree | 01644e809810230708b140538e788c5a24fe2132 /lib | |
parent | 1238dfec836aff66320a67f85768b172c0ed46ed (diff) |
use the portable construct around asprintf; pointed out by halex
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/conf/conf_mod.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libcrypto/conf/conf_mod.c b/lib/libcrypto/conf/conf_mod.c index 436f239b12e..24170865378 100644 --- a/lib/libcrypto/conf/conf_mod.c +++ b/lib/libcrypto/conf/conf_mod.c @@ -551,7 +551,8 @@ CONF_get1_default_config_file(void) file = getenv("OPENSSL_CONF"); if (file) return BUF_strdup(file); - asprintf(&file, "%s/openssl.cnf", X509_get_default_cert_area()); + if (asprintf(&file, "%s/openssl.cnf", X509_get_default_cert_area()) == -1) + return (NULL); return file; } |