$OpenBSD: patch-wslib_misc_c,v 1.1.1.1 2001/01/09 20:59:35 naddy Exp $
--- wslib/misc.c.orig	Fri Mar 31 22:10:25 2000
+++ wslib/misc.c	Tue Jan  9 20:59:01 2001
@@ -215,9 +215,9 @@ SGetSoundFile(char *file)
 			SErrorCode = SERR_NOMEMORY;
 			return NULL;
 		}
-		strcpy(strbuffer, exppath);
-		strcat(strbuffer, "/");
-		strcat(strbuffer, file);
+		strlcpy(strbuffer, exppath, MAXPATHLEN);
+		strlcat(strbuffer, "/", MAXPATHLEN);
+		strlcat(strbuffer, file, MAXPATHLEN);
 		if (checkForFile(strbuffer) == 0) {
 			free(exppath);
 			return strbuffer;
@@ -267,9 +267,9 @@ SGetSoundSetFile(char *sndsetfile)
 			free(strpath);
 			return NULL;
 		}
-		strcpy(strbuffer, strpath);
-		strcat(strbuffer, "/");
-		strcat(strbuffer, sndsetfile);
+		strlcpy(strbuffer, strpath, MAXPATHLEN);
+		strlcat(strbuffer, "/", MAXPATHLEN);
+		strlcat(strbuffer, sndsetfile, MAXPATHLEN);
 		if (checkForFile(strbuffer) == 0) {
 			free(strpath);
 			return strbuffer;
