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>2011-04-19 10:59:49 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-04-19 10:59:49 +0400
commit5b920bc2ff1e78767842b13f6997298b7e438204 (patch)
tree762e490545d634d6f1d3c394f26e392b82a4aa6d /source/blender/editors/render
parent6a91cf9adb750810d942104cf6ce5fef5a7bf999 (diff)
Some strings to store ID names were too small, could cause stack corruption.
corrected these and replaced 'sizeof(((ID *)NULL)->name)-2' with 'MAX_ID_NAME-2'.
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r--source/blender/editors/render/render_internal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 71c88ae9e8f..ce434413a5f 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -736,7 +736,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
if(RNA_property_is_set(op->ptr, "layer")) {
SceneRenderLayer *rl;
Scene *scn;
- char scene_name[19], rl_name[RE_MAXNAME];
+ char scene_name[MAX_ID_NAME-2], rl_name[RE_MAXNAME];
RNA_string_get(op->ptr, "layer", rl_name);
RNA_string_get(op->ptr, "scene", scene_name);
@@ -828,7 +828,7 @@ void RENDER_OT_render(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "animation", 0, "Animation", "Render files from the animation range of this scene");
RNA_def_boolean(ot->srna, "write_still", 0, "Write Image", "Save rendered the image to the output path (used only when animation is disabled)");
RNA_def_string(ot->srna, "layer", "", RE_MAXNAME, "Render Layer", "Single render layer to re-render");
- RNA_def_string(ot->srna, "scene", "", sizeof(((ID *)NULL)->name)-2, "Scene", "Re-render single layer in this scene");
+ RNA_def_string(ot->srna, "scene", "", MAX_ID_NAME-2, "Scene", "Re-render single layer in this scene");
}
/* ****************************** opengl render *************************** */