$OpenBSD: patch-src_FilePath_cxx,v 1.1 2007/01/18 10:56:27 steven Exp $
--- src/FilePath.cxx.orig	Thu Jan 18 09:11:18 2007
+++ src/FilePath.cxx	Thu Jan 18 11:32:20 2007
@@ -245,7 +245,7 @@ static char *split(char*& s, char c) {
 
 FilePath FilePath::NormalizePath() const {
 	char *path = new char[fileName.length() + 1];
-	strcpy(path, AsInternal());
+	strlcpy(path, AsInternal(), fileName.length() + 1);
 #ifdef WIN32
 	// Convert unix path separators to Windows
 	for (char *cp = path; *cp; cp++) {
@@ -276,7 +276,7 @@ FilePath FilePath::NormalizePath() const
 		} else {
 			if (cur > absPath && *(cur - 1) != pathSepChar)
 				*cur++ = pathSepChar;
-			strcpy(cur, part);
+			strlcpy(cur, part, fileName.length() + 1 + (absPath - cur));
 			cur += strlen(part);
 		}
 	}
@@ -307,7 +307,7 @@ FilePath FilePath::VMSToUnixStyle() {
 		if (strstr (vmsName, "//") == NULL) {
 			return FilePath(vmsName);
 		}
-		strcpy(unixStyleFileName, vmsName);
+		strlcpy(unixStyleFileName, vmsName, sizeof(unixStyleFileName));
 		char *p;
 		while ((p = strstr (unixStyleFileName, "//")) != NULL) {
 			strcpy (p, p + 1);
@@ -320,10 +320,10 @@ FilePath FilePath::VMSToUnixStyle() {
 	// o [dir.dir]file.type
 
 	if (vmsName [0] == '/') {
-		strcpy(unixStyleFileName, vmsName);
+		strlcpy(unixStyleFileName, vmsName, sizeof(unixStyleFileName));
 	} else {
 		unixStyleFileName [0] = '/';
-		strcpy(unixStyleFileName + 1, vmsName);
+		strlcpy(unixStyleFileName + 1, vmsName, sizeof(unixStyleFileName));
 		char *p = strstr(unixStyleFileName, ":[");
 		if (p == NULL) {
 			// o logical:file.type
