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/editors/interface/interface_utils.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/editors/interface/interface_utils.c')
-rw-r--r-- | source/blender/editors/interface/interface_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index f22c8eb4bfe..1ec125c2f26 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -52,7 +52,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind { uiBut *but=NULL; const char *propname= RNA_property_identifier(prop); - char prop_item[sizeof(((IDProperty *)NULL)->name)+4]; /* size of the ID prop name + room for [""] */ + char prop_item[MAX_IDPROP_NAME+4]; /* size of the ID prop name + room for [""] */ int arraylen= RNA_property_array_length(ptr, prop); /* support for custom props */ |