From 868874bd100f7466687661b7bc99e46777c27529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Luc=20Peuri=C3=A8re?= Date: Mon, 13 Mar 2006 18:27:51 +0000 Subject: security patch #3910 provided by Joerg Sonnenberger on Os X file opening --- intern/ghost/intern/GHOST_SystemCarbon.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'intern/ghost') diff --git a/intern/ghost/intern/GHOST_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp index d1caadab219..49a49914576 100644 --- a/intern/ghost/intern/GHOST_SystemCarbon.cpp +++ b/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; -- cgit v1.2.3