From 8bd901c3c143fd297396742dc936084e6db979ca Mon Sep 17 00:00:00 2001 From: Inkyun Kil Date: Thu, 30 Jun 2022 15:31:15 +0900 Subject: [PATCH] Fix stack-buffer-overflow - gsize is unsigned long. Change-Id: I5b46a18569b69de683c8b56b11dffff79515338f Signed-off-by: Inkyun Kil --- lib/alarm-lib-dbus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/alarm-lib-dbus.c b/lib/alarm-lib-dbus.c index 7ace21d..7916b1b 100644 --- a/lib/alarm-lib-dbus.c +++ b/lib/alarm-lib-dbus.c @@ -332,7 +332,7 @@ bundle *_send_alarm_get_appsvc_info(alarm_context_t context, alarm_id_t alarm_id notification_h _send_alarm_get_noti_info(alarm_context_t context, alarm_id_t alarm_id, int *error_code) { int return_code = -1; - int datalen; + gsize datalen; GVariant *noti_gv = NULL; GVariant *body = NULL; notification_h noti = NULL; @@ -360,7 +360,7 @@ notification_h _send_alarm_get_noti_info(alarm_context_t context, alarm_id_t ala if (error_code) *error_code = return_code; } else { - data = g_base64_decode(noti_data, (gsize *)&datalen); + data = g_base64_decode(noti_data, &datalen); noti_gv = g_variant_new_from_data(G_VARIANT_TYPE("(v)"), data, datalen, -- 2.7.4