diff options
author | 2014-04-18 15:38:16 +0000 | |
---|---|---|
committer | 2014-04-18 15:38:16 +0000 | |
commit | e19626267f2a403a068de8085f2052e1c259da5f (patch) | |
tree | efdf475c83843a0e07ab9c84167428144359b48e /lib/libssl/src | |
parent | reaching into altq outside #ifdef ALTQ is bad, mmkay? ok claudio (diff) | |
download | wireguard-openbsd-e19626267f2a403a068de8085f2052e1c259da5f.tar.xz wireguard-openbsd-e19626267f2a403a068de8085f2052e1c259da5f.zip |
use the portable construct around asprintf; pointed out by halex
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/apps/apps.c | 3 | ||||
-rw-r--r-- | lib/libssl/src/crypto/conf/conf_mod.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/libssl/src/apps/apps.c b/lib/libssl/src/apps/apps.c index cb9f8b0058e..446bb4d17ce 100644 --- a/lib/libssl/src/apps/apps.c +++ b/lib/libssl/src/apps/apps.c @@ -1326,7 +1326,8 @@ make_config_name() const char *t = X509_get_default_cert_area(); char *p; - asprintf(&p, "%s/openssl.cnf", t); + if (asprintf(&p, "%s/openssl.cnf", t) == -1) + return NULL; return p; } diff --git a/lib/libssl/src/crypto/conf/conf_mod.c b/lib/libssl/src/crypto/conf/conf_mod.c index 436f239b12e..24170865378 100644 --- a/lib/libssl/src/crypto/conf/conf_mod.c +++ b/lib/libssl/src/crypto/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; } |