$OpenBSD: patch-lib_mui_browseparse_c,v 1.1.1.1 2001/06/20 18:55:24 lebel Exp $ --- lib/mui/browseparse.c.orig Fri Aug 7 20:15:06 1998 +++ lib/mui/browseparse.c Wed Jun 20 12:11:38 2001 @@ -58,15 +58,15 @@ void parsebrowsefile(FILE *f) while (0 != fgets(buffer, 299, f)) switch(buffer[0]) { case 'D': - strcpy(currentdirectoryname, &buffer[2]); + strlcpy(currentdirectoryname, &buffer[2], sizeof(currentdirectoryname)); nukecr(currentdirectoryname); break; case 'F': - strcpy(currentfilename, &buffer[2]); + strlcpy(currentfilename, &buffer[2], sizeof(currentfilename)); nukecr(currentfilename); break; case 'P': - strcpy(browseprompt, &buffer[2]); + strlcpy(browseprompt, &buffer[2], sizeof(browseprompt)); nukecr(browseprompt); break; case 'X': @@ -86,9 +86,9 @@ void setcurrentfilename(char *s) sptr = &s[len-1]; while (sptr != s) { if (*sptr == '/') { - strcpy(currentfilename, sptr+1); + strlcpy(currentfilename, sptr+1, sizeof(currentfilename)); *sptr = 0; - strcpy(currentdirectoryname, s); + strlcpy(currentdirectoryname, s, sizeof(currentdirectoryname)); return; } sptr--;