$NetBSD: patch-aa,v 1.5 2006/02/12 21:52:19 joerg Exp $ --- intern/ghost/intern/GHOST_SystemCarbon.cpp.orig 2006-02-12 22:17:07.000000000 +0100 +++ intern/ghost/intern/GHOST_SystemCarbon.cpp @@ -527,7 +527,8 @@ static char g_firstFileBuf[512]; extern "C" int GHOST_HACK_getFirstFile(char buf[512]) { if (g_hasFirstFile) { - strcpy(buf, g_firstFileBuf); + strncpy(buf, g_firstFileBuf, sizeof(buf) - 1); + buf[sizeof(buf) - 1] = '\0'; return 1; } else { return 0;