diff options
author | Jean-Luc Peurière <jlp@nerim.net> | 2006-03-13 21:27:51 +0300 |
---|---|---|
committer | Jean-Luc Peurière <jlp@nerim.net> | 2006-03-13 21:27:51 +0300 |
commit | 868874bd100f7466687661b7bc99e46777c27529 (patch) | |
tree | 3fd79c16b7b189150b97c8552e8552e2e288e02f /intern | |
parent | 4a673d1d9bddb2f3423630397364082a75a0745a (diff) |
security patch #3910 provided by Joerg Sonnenberger on Os X
file opening
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCarbon.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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; |