From aef60abe6a1772e18634984a94bd70f57d57ccdd Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 16 Feb 2017 10:19:59 +0100 Subject: 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 --- dirmngr/http.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'dirmngr/http.c') 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; -- cgit v1.2.3