[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16521] trunk/blender/source/gameengine/ Converter/KX_ConvertActuators.cpp: Bugfix: avoid crash with too long pathname.

Andrea Weikert elubie at gmx.net
Sun Sep 14 18:22:03 CEST 2008


Revision: 16521
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16521
Author:   elubie
Date:     2008-09-14 18:22:03 +0200 (Sun, 14 Sep 2008)

Log Message:
-----------
Bugfix: avoid crash with too long pathname.

Modified Paths:
--------------
    trunk/blender/source/gameengine/Converter/KX_ConvertActuators.cpp

Modified: trunk/blender/source/gameengine/Converter/KX_ConvertActuators.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/KX_ConvertActuators.cpp	2008-09-14 14:17:44 UTC (rev 16520)
+++ trunk/blender/source/gameengine/Converter/KX_ConvertActuators.cpp	2008-09-14 16:22:03 UTC (rev 16521)
@@ -74,6 +74,8 @@
 #include "BKE_text.h"
 #include "BLI_blenlib.h"
 
+#define FILE_MAX 240 // repeated here to avoid dependency from BKE_utildefines.h
+
 #include "KX_NetworkMessageActuator.h"
 
 #ifdef WIN32
@@ -362,7 +364,7 @@
 					if (soundact->sound) {
 						/* Need to convert the samplename into absolute path
 						 * before checking if its loaded */
-						char fullpath[sizeof(soundact->sound->name)];
+						char fullpath[FILE_MAX];
 						
 						/* dont modify soundact->sound->name, only change a copy */
 						BLI_strncpy(fullpath, soundact->sound->name, sizeof(fullpath));





More information about the Bf-blender-cvs mailing list