From: raster Date: Fri, 29 Jul 2011 11:48:56 +0000 (+0000) Subject: From: Jihoon Kim X-Git-Tag: submit/trunk/20120815.180907~566 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e99f2d2cfa1e6f0c14a56b8fc6e5032d5440d4a5;p=profile%2Fivi%2Fedje.git From: Jihoon Kim Subject: [E-devel] [PATCH] check NULL parameter in edje entry This simple patch is for checking NULL parameter in the callback functions related to input method framework. I think it is necessary for safety. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@61890 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/edje_entry.c b/src/lib/edje_entry.c index fcd7185..d7fa2e4 100644 --- a/src/lib/edje_entry.c +++ b/src/lib/edje_entry.c @@ -2694,7 +2694,7 @@ _edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event) Evas_Textblock_Cursor *tc; Eina_Bool cursor_move = EINA_FALSE; - if (!rp) return ECORE_CALLBACK_PASS_ON; + if ((!rp) || (!ev) || (!ev->str)) return ECORE_CALLBACK_PASS_ON; en = rp->entry_data; if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || @@ -2779,7 +2779,7 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void * int i; Eina_Bool preedit_end_state = EINA_FALSE; - if (!rp) return ECORE_CALLBACK_PASS_ON; + if ((!rp) || (!ev)) return ECORE_CALLBACK_PASS_ON; en = rp->entry_data; if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || @@ -2873,7 +2873,7 @@ _edje_entry_imf_event_delete_surrounding_cb(void *data, int type __UNUSED__, voi Evas_Textblock_Cursor *del_start, *del_end; int cursor_pos; - if (!rp) return ECORE_CALLBACK_PASS_ON; + if ((!rp) || (!ev)) return ECORE_CALLBACK_PASS_ON; en = rp->entry_data; if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))