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 744c834..e589ce2 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 6ed1b2d..66c039f 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 62e15a5..1b6f156 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;