From 5b920bc2ff1e78767842b13f6997298b7e438204 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 19 Apr 2011 06:59:49 +0000 Subject: 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'. --- source/blender/editors/space_outliner/outliner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_outliner/outliner.c') diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 765cd360f96..ed26440d37d 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -5665,7 +5665,7 @@ static void outliner_buttons(const bContext *C, uiBlock *block, ARegion *ar, Spa if(tselem->type==TSE_EBONE) len = sizeof(((EditBone*) 0)->name); else if (tselem->type==TSE_MODIFIER) len = sizeof(((ModifierData*) 0)->name); else if(tselem->id && GS(tselem->id->name)==ID_LI) len = sizeof(((Library*) 0)->name); - else len= sizeof(((ID*) 0)->name)-2; + else len= MAX_ID_NAME-2; dx= (int)UI_GetStringWidth(te->name); -- cgit v1.2.3