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
diff options
context:
space:
mode:
authorAndrea Weikert <elubie@gmx.net>2008-03-30 20:18:01 +0400
committerAndrea Weikert <elubie@gmx.net>2008-03-30 20:18:01 +0400
commitd9de141077873c9379d0bd6ea745b60f5180c4d2 (patch)
tree36c40794cad938487904814b022f886b9eef9cc9 /source/blender/src/usiblender.c
parentcc4858cde045d17cef5ea9c847484e3168364bd4 (diff)
== bugfix ==
fix for [#6950] Blender crashes when .blog file top line is 160 characters or more - made sure BLI_convertstringcode doesn't return more than 240 chars - went through all callers and fixed places where string passed to BLI_convertstringcode was too short - TODO: look into increasing sample->name and sound->name too, I prevented crashes, but filename might get shortened.
Diffstat (limited to 'source/blender/src/usiblender.c')
-rw-r--r--source/blender/src/usiblender.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c
index 7ed1c430431..e74316bbb10 100644
--- a/source/blender/src/usiblender.c
+++ b/source/blender/src/usiblender.c
@@ -596,7 +596,7 @@ static void outliner_242_patch(void)
/* only here settings for fullscreen */
int BIF_read_homefile(int from_memory)
{
- char tstr[FILE_MAXDIR+FILE_MAXFILE], scestr[FILE_MAXDIR];
+ char tstr[FILE_MAXDIR+FILE_MAXFILE], scestr[FILE_MAX];
char *home= BLI_gethome();
int success;
struct TmpFont *tf;
@@ -617,7 +617,7 @@ int BIF_read_homefile(int from_memory)
G.relbase_valid = 0;
if (!from_memory) BLI_make_file_string(G.sce, tstr, home, ".B.blend");
- strcpy(scestr, G.sce); /* temporal store */
+ BLI_strncpy(scestr, G.sce, FILE_MAX); /* temporal store */
/* prevent loading no UI */
G.fileflags &= ~G_FILE_NO_UI;
@@ -913,7 +913,7 @@ void BIF_write_file(char *target)
if (BLO_write_file(di, writeflags, &err)) {
strcpy(G.sce, di);
G.relbase_valid = 1;
- strcpy(G.main->name, di); /* is guaranteed current file */
+ BLI_strncpy(G.main->name, di, FILE_MAX); /* is guaranteed current file */
mainwindow_set_filename_to_title(G.main->name);