From: sinikang Date: Fri, 1 Feb 2019 05:15:13 +0000 (+0900) Subject: Fix svace issue (381534) X-Git-Tag: accepted/tizen/unified/20190208.061601^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F50%2F199050%2F1;p=profile%2Fmobile%2Fapps%2Fnative%2Fciss.git Fix svace issue (381534) Change-Id: Id4b2eeca184e7208b8cb7cb1420602e6054d1fd9 Signed-off-by: sinikang --- diff --git a/packaging/org.tizen.ciss.spec b/packaging/org.tizen.ciss.spec index b644f07..dbf469a 100644 --- a/packaging/org.tizen.ciss.spec +++ b/packaging/org.tizen.ciss.spec @@ -1,6 +1,6 @@ %define major 0 %define minor 1 -%define patchlevel 6 +%define patchlevel 7 Name: org.tizen.ciss Summary: CISS-MMI application diff --git a/src/ciss-main.c b/src/ciss-main.c index 24e92c9..7f43812 100644 --- a/src/ciss-main.c +++ b/src/ciss-main.c @@ -505,30 +505,37 @@ static int __ciss_relaunch_handler(void *data) if (err != APP_CONTROL_ERROR_NONE) { DBG("app_control_get_extra_data for KEY_EVENT_TYPE failed - (%d)\n", err); } - event_type = atoi(key_event_type); - ad->tapi_event.event_type = event_type; + if (key_event_type) { + event_type = atoi(key_event_type); + ad->tapi_event.event_type = event_type; + } + #ifdef _CISS_USE_PARAM err = app_control_get_extra_data(ad->app_control_handle, "KEY_STATUS", &key_status); if (err != APP_CONTROL_ERROR_NONE) { DBG("app_control_get_extra_data for KEY_STATUS failed - (%d)\n", err); } - event_status = atoi(key_status); - ad->tapi_event.status = event_status; + if (key_status) { + event_status = atoi(key_status); + ad->tapi_event.status = event_status; + } err = app_control_get_extra_data(ad->app_control_handle, "KEY_ENCODED_DATA_LENGTH", &key_encoded_data_length); if (err != APP_CONTROL_ERROR_NONE) { DBG("app_control_get_extra_data for KEY_ENCODED_DATA_LENGTH failed - (%d)\n", err); } - encoded_data_length = atoi(key_encoded_data_length); + if (key_encoded_data_length) + encoded_data_length = atoi(key_encoded_data_length); #endif err = app_control_get_extra_data(ad->app_control_handle, "KEY_ENCODED_DATA", &key_encoded_data); if (err != APP_CONTROL_ERROR_NONE) { DBG("app_control_get_extra_data for KEY_ENCODED_DATA failed - (%d)\n", err); } - gchar *decoded_data; - gsize decoded_data_length; + gchar *decoded_data = NULL; + gsize decoded_data_length = 0; - decoded_data = (gchar *)g_base64_decode((gchar *)key_encoded_data, &decoded_data_length); + if (key_encoded_data) + decoded_data = (gchar *)g_base64_decode((gchar *)key_encoded_data, &decoded_data_length); ad->tapi_event.data_length = decoded_data_length; ad->tapi_event.p_data = decoded_data;