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'.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user