$OpenBSD: patch-Utilities_cmtar_encode_c,v 1.1.1.1 2006/07/20 09:23:13 espie Exp $
--- Utilities/cmtar/encode.c.orig	Mon Jul  3 15:14:22 2006
+++ Utilities/cmtar/encode.c	Mon Jul  3 15:16:08 2006
@@ -91,7 +91,7 @@ th_set_path(TAR *t, char *pathname)
   t->th_buf.gnu_longname = NULL;
 
   if (pathname[strlen(pathname) - 1] != '/' && TH_ISDIR(t))
-    strcpy(suffix, "/");
+    strlcpy(suffix, "/", sizeof suffix);
 
   if (strlen(pathname) > T_NAMELEN && (t->options & TAR_GNU))
   {
@@ -135,7 +135,7 @@ th_set_link(TAR *t, char *linkname)
   {
     /* GNU longlink format */
     t->th_buf.gnu_longlink = strdup(linkname);
-    strcpy(t->th_buf.linkname, "././@LongLink");
+    strlcpy(t->th_buf.linkname, "././@LongLink", sizeof t->th_buf.linkname);
   }
   else
   {
