--- src/filenames.c.orig 2004-12-10 01:02:40.169865325 +0000 +++ src/filenames.c 2004-12-10 01:11:20.216849029 +0000 @@ -225,7 +225,7 @@ char *sp; memset(buffer,0,CF_BUFSIZE); -strcpy(buffer,str); +strncpy(buffer,str, sizeof(buffer)-1); for (sp = buffer; *sp != '\0'; sp++) { @@ -246,7 +246,7 @@ char *sp; memset(buffer,0,CF_BUFSIZE); -strcpy(buffer,str); +strncpy(buffer,str, sizeof(buffer)-1); for (sp = buffer; *sp != '\0'; sp++) { @@ -267,7 +267,7 @@ struct Item *ip; memset(buffer,0,CF_BUFSIZE); -strcpy(buffer,str); +strncpy(buffer,str, sizeof(buffer)-1); for (ip = VADDCLASSES; ip != NULL; ip=ip->next) { @@ -276,8 +276,8 @@ break; } - strcat(buffer,"."); - strcat(buffer,ip->name); + strncat(buffer, ".", sizeof(buffer)-1); + strcat(buffer, ip->name, sizeof(buffer)-1); } return buffer; @@ -367,7 +367,7 @@ strcpy(currentpath,pathbuf); DeleteSlash(currentpath); - strcat(currentpath,".cf-moved"); + strncat(currentpath,".cf-moved", sizeof(currentpath)-1); snprintf(OUTPUT,CF_BUFSIZE,"Moving obstructing file/link %s to %s to make directory",pathbuf,currentpath); CfLog(cferror,OUTPUT,"");