[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14235] trunk/blender/source/blender/src: Raise the limit for long filenames.
Campbell Barton
ideasman42 at gmail.com
Tue Mar 25 10:40:10 CET 2008
Revision: 14235
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14235
Author: campbellbarton
Date: 2008-03-25 10:40:06 +0100 (Tue, 25 Mar 2008)
Log Message:
-----------
Raise the limit for long filenames.
a few times peach guys have had the play button fail with "stack smash" warnings in the terminal and play button not working.
This fixes a reproducible crash where blender would segfault when pressing play on long filenames, and hopefully fixes odd user reports where pressing play quits X11 or reboots their system.
Modified Paths:
--------------
trunk/blender/source/blender/src/buttons_scene.c
trunk/blender/source/blender/src/playanim.c
Modified: trunk/blender/source/blender/src/buttons_scene.c
===================================================================
--- trunk/blender/source/blender/src/buttons_scene.c 2008-03-25 09:17:58 UTC (rev 14234)
+++ trunk/blender/source/blender/src/buttons_scene.c 2008-03-25 09:40:06 UTC (rev 14235)
@@ -1336,7 +1336,7 @@
static void run_playanim(char *file)
{
extern char bprogname[]; /* usiblender.c */
- char str[FILE_MAX];
+ char str[FILE_MAX*2]; /* FILE_MAX*2 is a bit arbitary, but this should roughly allow for the args + the max-file-length */
int pos[2], size[2];
/* use current settings for defining position of window. it actually should test image size */
Modified: trunk/blender/source/blender/src/playanim.c
===================================================================
--- trunk/blender/source/blender/src/playanim.c 2008-03-25 09:17:58 UTC (rev 14234)
+++ trunk/blender/source/blender/src/playanim.c 2008-03-25 09:40:06 UTC (rev 14235)
@@ -202,7 +202,7 @@
pupdate_time();
if(picture && (qualN & (SHIFT|LMOUSE))) {
- char str[256];
+ char str[512];
cpack(-1);
glRasterPos2f(0.02f, 0.03f);
sprintf(str, "%s | %.2f frames/s\n", picture->name, 1.0 / swaptime);
@@ -215,12 +215,12 @@
static void build_pict_list(char * first, int totframes)
{
int size,pic,file;
- char *mem, name[256];
+ char *mem, name[512];
short val;
struct pict * picture = 0;
struct ImBuf *ibuf = 0;
int count = 0;
- char str[100];
+ char str[512];
struct anim * anim;
if (IMB_isanim(first)) {
@@ -338,7 +338,7 @@
{
struct ImBuf *ibuf = 0;
struct pict *picture = 0;
- char name[256];
+ char name[512];
short val = 0, go = TRUE, ibufx = 0, ibufy = 0;
int event, stopped = FALSE, maxwinx, maxwiny;
short /* c233 = FALSE, */ /* yuvx = FALSE, */ once = FALSE, sstep = FALSE, wait2 = FALSE, /* resetmap = FALSE, */ pause = 0;
More information about the Bf-blender-cvs
mailing list