$OpenBSD: patch-bin_afppasswd_afppasswd_c,v 1.1 2003/08/22 11:18:19 naddy Exp $
--- bin/afppasswd/afppasswd.c.orig	Mon Aug 18 13:35:13 2003
+++ bin/afppasswd/afppasswd.c	Mon Aug 18 13:39:17 2003
@@ -78,7 +78,7 @@ char *strchr (), *strrchr ();
 #define HEXPASSWDLEN 16
 #define PASSWDLEN 8
 
-static char buf[MAXPATHLEN + 1];
+static char buf[MAXPATHLEN];
 
 /* if newpwd is null, convert buf from hex to binary. if newpwd isn't
  * null, convert newpwd to hex and save it in buf. */
@@ -142,9 +142,9 @@ static int update_passwd(const char *pat
   }
 
   /* open the key file if it exists */
-  strcpy(buf, path);
+  (void)strlcpy(buf, path, sizeof(buf));
   if (strlen(path) < sizeof(buf) - 5) {
-    strcat(buf, ".key");
+    (void)strlcat(buf, ".key", sizeof(buf));
     keyfd = open(buf, O_RDONLY);
   } 
 
