From: Michael R Sweet Date: Fri, 8 Sep 2023 16:48:37 +0000 (-0400) Subject: Move strlcat/cpy to cupsConcat/CopyString. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c96d2f8818999acde33a4964849e51da8605ffba;p=thirdparty%2Fcups.git Move strlcat/cpy to cupsConcat/CopyString. --- diff --git a/cups/http-addr.c b/cups/http-addr.c index 031d703df5..bb9225a6db 100644 --- a/cups/http-addr.c +++ b/cups/http-addr.c @@ -862,7 +862,7 @@ httpGetHostname(http_t *http, // I - HTTP connection or NULL // Make sure .local hostnames end with a period... if (strlen(s) > 6 && !strcmp(s + strlen(s) - 6, ".local")) - strlcat(s, ".", (size_t)slen); + cupsConcatString(s, ".", (size_t)slen); } // Convert the hostname to lowercase as needed... diff --git a/cups/http.c b/cups/http.c index 39780bed5d..cde5f09b1a 100644 --- a/cups/http.c +++ b/cups/http.c @@ -3346,8 +3346,8 @@ http_add_field(http_t *http, // I - HTTP connection else if ((mcombined = realloc(http->fields[field], total + 1)) != NULL) { http->fields[field] = mcombined; - strlcat(mcombined, ", ", total + 1); - strlcat(mcombined, value, total + 1); + cupsConcatString(mcombined, ", ", total + 1); + cupsConcatString(mcombined, value, total + 1); } } else diff --git a/scheduler/testlpd.c b/scheduler/testlpd.c index b85e681bd6..3feea7ef93 100644 --- a/scheduler/testlpd.c +++ b/scheduler/testlpd.c @@ -412,11 +412,11 @@ remove_job(int outfd, /* I - Command file descriptor */ for (i = 0; args[i]; i ++) { - strlcat(command, " ", sizeof(command)); - strlcat(command, args[i], sizeof(command)); + cupsConcatString(command, " ", sizeof(command)); + cupsConcatString(command, args[i], sizeof(command)); } - strlcat(command, "\n", sizeof(command)); + cupsConcatString(command, "\n", sizeof(command)); return (do_command(outfd, infd, command)); }