From 3b1a0c65f433cc2f96d868b561ab43e699c559b3 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 9 Jan 2014 15:13:51 +0900 Subject: [PATCH] list test - make test item never able to access invalid mem fixes CID 1040020 --- src/bin/test_list.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/test_list.c b/src/bin/test_list.c index 5bc75ef..e8b2de6 100644 --- a/src/bin/test_list.c +++ b/src/bin/test_list.c @@ -1288,7 +1288,7 @@ test_list8_focus_animate_check_changed(void *data, Evas_Object *obj, void *event void test_list_focus(const char *name, const char *title, Eina_Bool horiz) { Evas_Object *win, *li, *bx, *bxx, *chk; - unsigned lhand, rhand, idx; + unsigned int lhand, rhand, idx; char buf[256]; win = elm_win_util_standard_add(name, title); @@ -1340,6 +1340,8 @@ void test_list_focus(const char *name, const char *title, Eina_Bool horiz) lhand = _list_focus_combo[idx] / 10; rhand = _list_focus_combo[idx] % 10; + if (lhand > 4) lhand = 4; + if (rhand > 4) rhand = 4; snprintf(buf, sizeof(buf), " %s / %s ", _list_focus_names[lhand], _list_focus_names[rhand]); -- 2.7.4