]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Move strlcat/cpy to cupsConcat/CopyString.
authorMichael R Sweet <michael.r.sweet@gmail.com>
Fri, 8 Sep 2023 16:48:37 +0000 (12:48 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Fri, 8 Sep 2023 16:48:37 +0000 (12:48 -0400)
cups/http-addr.c
cups/http.c
scheduler/testlpd.c

index 031d703df5b90398e9496e50be7d24176ff40cbe..bb9225a6dba2918f9fd27622fae466aed64e902b 100644 (file)
@@ -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...
index 39780bed5daf7ee3b6b1e424431e5701c33e0b8e..cde5f09b1a302df758c1c5fd36cb72222bab523f 100644 (file)
@@ -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
index b85e681bd67bee0577b7921327bd9bb44ca0fb2a..3feea7ef939ece4c5372bf68d8426e388c2005c7 100644 (file)
@@ -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));
 }