PUI: fix memory corruption 58/220658/1
authorSung-Jin Park <sj76.park@samsung.com>
Wed, 21 Aug 2019 04:15:34 +0000 (13:15 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Fri, 20 Dec 2019 07:13:48 +0000 (16:13 +0900)
Change-Id: If4f0ab5e84283da4dfac610c09bd1f25383830ae
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
src/PUI.c
src/PUI_ani.c
src/PUI_common.h

index 744c8341587c868944367cc7d51ebda1dfb63429..e589ce26398624c59050b66549286d66be1ddac1 100644 (file)
--- a/src/PUI.c
+++ b/src/PUI.c
@@ -73,7 +73,7 @@ pui_create(Ecore_Wl2_Window *win)
                return NULL;
        }
 
-       handle = (pui_h)calloc(1, sizeof(pui_h));
+       handle = (pui_h)calloc(1, sizeof(pui));
 
        if (!handle)
                return NULL;
index 6ed1b2dd57fc369d8f1d223aacdc5098e92edfa1..66c039f47f131c4d59f757ca4f5b8dc51ff34507 100644 (file)
@@ -574,7 +574,7 @@ pui_ani_create(pui_h handle, pui_id id)
                return NULL;
        }
 
-       ani_h = (pui_ani_h)calloc(1, sizeof(pui_ani_h));
+       ani_h = (pui_ani_h)calloc(1, sizeof(pui_ani));
 
        if (!ani_h)
        {
index 62e15a517afbdd5b2cc247a6027b62c4cdb670a9..1b6f1567b7298453d7c007c8261d568f2a360b83 100644 (file)
@@ -42,7 +42,9 @@ typedef unsigned int pui_bool;
 typedef char* pui_id;
 typedef char* pui_error_string;
 typedef struct _pui * pui_h;
+typedef struct _pui pui;
 typedef struct _pui_ani * pui_ani_h;
+typedef struct _pui_ani pui_ani;
 typedef struct _pui_module_data pui_module_data;
 typedef struct _PUI_Event_Animation_Status PUI_Event_Animation_Status;