]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Use cupsCopyString instead of strlcpy.
authorMichael R Sweet <msweet@msweet.org>
Fri, 5 Apr 2024 18:13:47 +0000 (14:13 -0400)
committerMichael R Sweet <msweet@msweet.org>
Fri, 5 Apr 2024 18:13:47 +0000 (14:13 -0400)
cups/dest-options.c

index a6d8339f221b1a4da8318a07f796f4a83e119155..434937349bc2a9ae9e9b443409910c4d3ead7704 100644 (file)
@@ -797,7 +797,7 @@ cupsCopyDestInfo(
 
     if ((uri = cupsGetOption("printer-uri-supported", dest->num_options, dest->options)) == NULL || httpSeparateURI(HTTP_URI_CODING_ALL, uri, scheme, sizeof(scheme), userpass, sizeof(userpass), host, sizeof(host), &port, resource, sizeof(resource)) < HTTP_URI_STATUS_OK)
     {
-      strlcpy(host, "localhost", sizeof(host));
+      cupsCopyString(host, "localhost", sizeof(host));
       port = cg->ipp_port;
     }