Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorJean-Luc Peurière <jlp@nerim.net>2006-06-21 00:24:07 +0400
committerJean-Luc Peurière <jlp@nerim.net>2006-06-21 00:24:07 +0400
commit5eb20cb91abe54d7b8de5c893da40dfe1719ea2c (patch)
tree68a31a6c70a5420f4a453bab02b706364c19f977 /intern
parent0deed7d1d7ee2a907834bc5f0f9ed81a1ed42e31 (diff)
fix of the previous security patch for file opening on Os X.
nobody noticed it was broken for 3 month ;)
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemCarbon.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp
index 49a49914576..ef9e91ec3df 100644
--- a/intern/ghost/intern/GHOST_SystemCarbon.cpp
+++ b/intern/ghost/intern/GHOST_SystemCarbon.cpp
@@ -522,13 +522,14 @@ GHOST_TSuccess GHOST_SystemCarbon::getButtons(GHOST_Buttons& buttons) const
return GHOST_kSuccess;
}
+#define FIRSTFILEBUFLG 512
static bool g_hasFirstFile = false;
static char g_firstFileBuf[512];
-extern "C" int GHOST_HACK_getFirstFile(char buf[512]) {
+extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) {
if (g_hasFirstFile) {
- strncpy(buf, g_firstFileBuf, sizeof(buf) - 1);
- buf[sizeof(buf) - 1] = '\0';
+ strncpy(buf, g_firstFileBuf, FIRSTFILEBUFLG - 1);
+ buf[FIRSTFILEBUFLG - 1] = '\0';
return 1;
} else {
return 0;