Commit: d74d6c7c1d18edfd4d066f59743dc82a3145c5b2
Author: Campbell Barton
Date:   Fri Dec 6 10:52:04 2013 +1100
http://developer.blender.org/rBd74d6c7c1d18edfd4d066f59743dc82a3145c5b2

Fix T37710: Missing bounds check for active UI list item could crash.

===================================================================

M       source/blender/editors/interface/interface_templates.c

===================================================================

diff --git a/source/blender/editors/interface/interface_templates.c 
b/source/blender/editors/interface/interface_templates.c
index db62cf8..ff45804 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -2971,7 +2971,9 @@ void uiTemplateList(uiLayout *layout, bContext *C, const 
char *listtype_name, co
                case UILST_LAYOUT_COMPACT:
                        row = uiLayoutRow(layout, TRUE);
 
-                       if (dataptr->data && prop && dyn_data->items_shown > 0) 
{
+                       if ((dataptr->data && prop) && (dyn_data->items_shown > 
0) &&
+                           (activei >= 0) && (activei < dyn_data->items_shown))
+                       {
                                PointerRNA *itemptr = &items_ptr[activei].item;
                                int org_i = items_ptr[activei].org_idx;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to