edje_entry: fix a potential error of null deref 10/253010/1
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Thu, 4 Feb 2021 02:00:14 +0000 (11:00 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Thu, 4 Feb 2021 02:01:55 +0000 (11:01 +0900)
Summary:
This is a patch to fix a potential error of null dereferencing.
This patch is based on D12087.

Reviewers: Hermet, jsuya

Reviewed By: jsuya

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12241

Change-Id: I564443644aabf64e055736c201b8df87f7eced9a

src/lib/edje/edje_entry.c

index 8f1f27beb9e8229b1a81242d28fcf807012cba2d..b4580831b5c71faba3b2641fba68385dcd66c9b7 100644 (file)
@@ -1402,6 +1402,8 @@ _anchors_update(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entry *en,
                {
                   Evas_Textblock_Rectangle *r;
 
+                  if (!range) break;
+
                   r = range->data;
                   *(&(sel->rect)) = *r;
                   if (_is_anchors_outside_viewport(y, r->y, r->h, vy, tvh) ||