From fff1f842d375ff03253fb241dba4cac72abc5fc9 Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Tue, 8 Aug 2017 10:17:39 +0900 Subject: [PATCH] Add null check for svace issues Add null check because alloc function could return null Change-Id: Ife8a3cc2cf48ba176e7e94c50c7d78bb2329fc6b --- src/lib/elm_atspi_bridge.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_atspi_bridge.c b/src/lib/elm_atspi_bridge.c index b3a77ed83..10227f387 100644 --- a/src/lib/elm_atspi_bridge.c +++ b/src/lib/elm_atspi_bridge.c @@ -7019,8 +7019,10 @@ elm_atspi_bridge_utils_say(const char* text, eldbus_message_iter_arguments_append(iter, "sb", text, discardable); if (func) { say_info = calloc(1, sizeof(Elm_Atspi_Say_Info)); - say_info->func = func; - say_info->data = (void *)data; + if (say_info) { + say_info->func = func; + say_info->data = (void *)data; + } } eldbus_connection_send(pd->a11y_bus, msg, _on_read_command_call, say_info, -1); } -- 2.34.1