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:
authorCampbell Barton <ideasman42@gmail.com>2009-12-22 13:04:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-12-22 13:04:15 +0300
commite207d045322db4656f42f68ae9fa092ac1478635 (patch)
tree7126490a68ff55d12a9197f1cabd3cf8e0c3b527 /source/blender/makesrna/intern/rna_render.c
parent8f5b2e946bd24cc4ee2b7496b1e022cb24f56f4f (diff)
quite a few python panels (10 or so) had names longer then the PanelType allowed,
for panels it would fail silently but for menu's it meant further references would give errors. increase the registered class name from 32 to 64 and raise an error if the limit reached.
Diffstat (limited to 'source/blender/makesrna/intern/rna_render.c')
-rw-r--r--source/blender/makesrna/intern/rna_render.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index 5a80db74c38..8212423acd5 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -125,7 +125,12 @@ static StructRNA *rna_RenderEngine_register(const bContext *C, ReportList *repor
/* validate the python class */
if(validate(&dummyptr, data, have_function) != 0)
return NULL;
-
+
+ if(strlen(identifier) >= sizeof(dummyet.idname)) {
+ BKE_reportf(reports, RPT_ERROR, "registering render engine class: '%s' is too long, maximum length is %d.", identifier, sizeof(dummyet.idname));
+ return NULL;
+ }
+
/* check if we have registered this engine type before, and remove it */
for(et=R_engines.first; et; et=et->next) {
if(strcmp(et->idname, dummyet.idname) == 0) {