artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1297a29
)
Use asprintf() for generating path, instead of multiple
author
deraadt
<deraadt@openbsd.org>
Fri, 18 Apr 2014 13:41:20 +0000
(13:41 +0000)
committer
deraadt
<deraadt@openbsd.org>
Fri, 18 Apr 2014 13:41:20 +0000
(13:41 +0000)
return-value-not-checked strlcpy and strlcat
lib/libssl/src/apps/apps.c
patch
|
blob
|
history
diff --git
a/lib/libssl/src/apps/apps.c
b/lib/libssl/src/apps/apps.c
index
c0130d4
..
cb9f8b0
100644
(file)
--- a/
lib/libssl/src/apps/apps.c
+++ b/
lib/libssl/src/apps/apps.c
@@
-1324,15
+1324,9
@@
char *
make_config_name()
{
const char *t = X509_get_default_cert_area();
- size_t len;
char *p;
- len = strlen(t) + strlen(OPENSSL_CONF) + 2;
- p = malloc(len);
- BUF_strlcpy(p, t, len);
- BUF_strlcat(p, "/", len);
- BUF_strlcat(p, OPENSSL_CONF, len);
-
+ asprintf(&p, "%s/openssl.cnf", t);
return p;
}