$OpenBSD: patch-src_sensible_c,v 1.1 2004/06/17 11:21:43 sturm Exp $ --- src/sensible.c.orig 2004-06-10 10:50:04.000000000 -0400 +++ src/sensible.c 2004-06-10 13:35:54.000000000 -0400 @@ -107,15 +107,15 @@ for (sp = nodename; *sp != '\0'; sp++) } } -strcpy(vbuff,path); +(void)strlcpy(vbuff,path,sizeof(vbuff)); AddSlash(vbuff); -strcat(vbuff,nodename); +(void)strlcat(vbuff,nodename,sizeof(vbuff)); if (suspicious && NONALPHAFILES) { snprintf(OUTPUT,CF_BUFSIZE,"Suspicious filename %s in %s has no alphanumeric content (security)",CanonifyName(nodename),path); CfLog(cfsilent,OUTPUT,""); - strcpy(newname,vbuff); + (void)strlcpy(newname,vbuff,sizeof(newname)); for (sp = newname+strlen(path); *sp != '\0'; sp++) { @@ -125,7 +125,7 @@ if (suspicious && NONALPHAFILES) } } - strcat(newname,".cf-nonalpha"); + (void)strlcat(newname,".cf-nonalpha",sizeof(newname)); snprintf(OUTPUT,CF_BUFSIZE,"Renaming file %s to %s",vbuff,newname); CfLog(cfsilent,OUTPUT,"");