diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-19 10:59:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-19 10:59:49 +0400 |
commit | 5b920bc2ff1e78767842b13f6997298b7e438204 (patch) | |
tree | 762e490545d634d6f1d3c394f26e392b82a4aa6d /source/blender/makesrna/intern/rna_ID.c | |
parent | 6a91cf9adb750810d942104cf6ce5fef5a7bf999 (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/makesrna/intern/rna_ID.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index ae62ef55c01..bde7c99c7df 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -443,7 +443,7 @@ static void rna_def_ID(BlenderRNA *brna) prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_ui_text(prop, "Name", "Unique datablock ID name"); RNA_def_property_string_funcs(prop, "rna_ID_name_get", "rna_ID_name_length", "rna_ID_name_set"); - RNA_def_property_string_maxlength(prop, sizeof(((ID*)NULL)->name)-2); + RNA_def_property_string_maxlength(prop, MAX_ID_NAME-2); RNA_def_property_editable_func(prop, "rna_ID_name_editable"); RNA_def_property_update(prop, NC_ID|NA_RENAME, NULL); RNA_def_struct_name_property(srna, prop); |