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>2007-02-09 01:43:32 +0300
committerAndrea Weikert <elubie@gmx.net>2007-02-09 01:43:32 +0300
commit95f462e3d07f2c1c8c0e4587cce450909c05c156 (patch)
tree2b0d595d4dec52efd0706a9d6f07d9ee27093b76 /source/blender/src/interface_icons.c
parentc02a71e21103db523f2955b1d6d172b418861449 (diff)
==== icon themes ====
fix for potential issue with very long pathnames to the blender executable
Diffstat (limited to 'source/blender/src/interface_icons.c')
-rw-r--r--source/blender/src/interface_icons.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/src/interface_icons.c b/source/blender/src/interface_icons.c
index cf66931c9bf..e400ca9af74 100644
--- a/source/blender/src/interface_icons.c
+++ b/source/blender/src/interface_icons.c
@@ -583,9 +583,9 @@ static void init_iconfile_list(struct ListBase *list)
int restoredir = 1; /* restore to current directory */
int totfile, i, index=1;
int ifilex, ifiley;
- char icondirstr[FILE_MAXDIR];
- char iconfilestr[FILE_MAXDIR+FILE_MAXFILE];
- char olddir[FILE_MAXDIR+FILE_MAXFILE];
+ char icondirstr[FILE_MAX];
+ char iconfilestr[FILE_MAX+16]; /* allow 256 chars for file+dir */
+ char olddir[FILE_MAX];
list->first = list->last = NULL;
@@ -613,6 +613,8 @@ static void init_iconfile_list(struct ListBase *list)
if(BLI_testextensie(filename, ".png")) {
/* check to see if the image is the right size, continue if not */
+ /* copying strings here should go ok, assuming that we never get back
+ a complete path to file longer than 256 chars */
sprintf(iconfilestr, "%s/%s", icondirstr, filename);
if(BLI_exists(iconfilestr)) bbuf = IMB_loadiffname(iconfilestr, IB_rect);