From bbde9bfe523a56e808a109993d8ad8f493cc6709 Mon Sep 17 00:00:00 2001 From: Sung-Jin Park Date: Wed, 21 Aug 2019 13:15:34 +0900 Subject: [PATCH] PUI: fix memory corruption Change-Id: If4f0ab5e84283da4dfac610c09bd1f25383830ae Signed-off-by: Sung-Jin Park --- src/PUI.c | 2 +- src/PUI_ani.c | 2 +- src/PUI_common.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/PUI.c b/src/PUI.c index 744c834..e589ce2 100644 --- 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; diff --git a/src/PUI_ani.c b/src/PUI_ani.c index 6ed1b2d..66c039f 100644 --- a/src/PUI_ani.c +++ b/src/PUI_ani.c @@ -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) { diff --git a/src/PUI_common.h b/src/PUI_common.h index 62e15a5..1b6f156 100644 --- a/src/PUI_common.h +++ b/src/PUI_common.h @@ -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; -- 2.7.4