ecore_fb: fix divided by zero
authorJunsuChoi <jsuya.choi@samsung.com>
Tue, 10 Apr 2018 06:22:54 +0000 (15:22 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 16 Apr 2018 05:45:14 +0000 (14:45 +0900)
Summary:
w and h must not be zero.
because of the divide_by_zero exception occurs on line 649 and 653.

Test Plan: N/A

Reviewers: woohyun, kimcinoo, cedric

Subscribers: cedric

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

Change-Id: I15226d204255ff0e94f464d4486fb322d0647157

src/lib/ecore_fb/ecore_fb_li.c

index 3850079..722bb3f 100644 (file)
@@ -47,7 +47,7 @@ _ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *ie
      {
         int offset = 0;
         const char *keyname = _ecore_fb_li_kbd_syms[iev->code * 7];
-        
+
         /* check the key table */
         if (iev->value)
           {
@@ -102,11 +102,11 @@ _ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *ie
 
         const char *key = _ecore_fb_li_kbd_syms[(iev->code * 7) + offset];
         const char *compose = _ecore_fb_li_kbd_syms[(iev->code * 7) + 3 + offset];
-        
+
         if (dev->keyboard.ctrl)
           {
              const char *ts = _ecore_fb_li_kbd_syms[(iev->code * 7) + 3 + 3];
-             
+
              if (ts) compose = ts;
           }