aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/http.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-02-16 09:19:59 +0000
committerWerner Koch <[email protected]>2017-02-16 09:33:26 +0000
commitaef60abe6a1772e18634984a94bd70f57d57ccdd (patch)
tree55785b8304265c76edd3a5ad3f6bbab6993b40ba /dirmngr/http.c
parentscd: Minor fixes to silence compiler warnings. (diff)
downloadgnupg-aef60abe6a1772e18634984a94bd70f57d57ccdd.tar.gz
gnupg-aef60abe6a1772e18634984a94bd70f57d57ccdd.zip
dirmngr: Replace stpcpy chains by strconcat.
* dirmngr/certcache.c (find_cert_bysn): Use strconcat. (find_cert_bysubject): Ditto. * dirmngr/http.c (store_header): Ditto. * dirmngr/ldap.c (make_url): Ditto. * dirmngr/server.c (get_cert_local_ski): Ditto. (do_get_cert_local): Use xstrconcat. -- Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'dirmngr/http.c')
-rw-r--r--dirmngr/http.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/dirmngr/http.c b/dirmngr/http.c
index fe9c3c734..0889cb1ee 100644
--- a/dirmngr/http.c
+++ b/dirmngr/http.c
@@ -2150,11 +2150,10 @@ store_header (http_t hd, char *line)
if (h)
{
/* We have already seen a line with that name. Thus we assume
- it is a comma separated list and merge them. */
- p = xtrymalloc (strlen (h->value) + 1 + strlen (value)+ 1);
+ * it is a comma separated list and merge them. */
+ p = strconcat (h->value, ",", value, NULL);
if (!p)
return gpg_err_code_from_syserror ();
- strcpy (stpcpy (stpcpy (p, h->value), ","), value);
xfree (h->value);
h->value = p;
return 0;