From 2c6fa8931c9df706be87521e63846beef0ebe7de Mon Sep 17 00:00:00 2001 From: Seungbae Shin Date: Thu, 23 Mar 2017 20:41:30 +0900 Subject: [PATCH] Fix SVACE defects [Version] 0.10.105 [Profile] Common [Issue Type] Security Change-Id: I60e738479c88a43070dd8ac71967ca57381d53eb --- mm_sound_client.c | 18 +++++++----------- packaging/libmm-sound.spec | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/mm_sound_client.c b/mm_sound_client.c index c1634f7..1515874 100644 --- a/mm_sound_client.c +++ b/mm_sound_client.c @@ -1151,17 +1151,15 @@ static gboolean _focus_callback_handler(gpointer user_data) debug_log(">>> _focus_callback_handler(), this thread id(%u)\n", (unsigned int)pthread_self()); - memset(&cb_data, 0, sizeof(focus_cb_data_lib)); if (!focus_handle) { debug_error("focus_handle is null"); return G_SOURCE_CONTINUE; } - if (!(poll_fd = &focus_handle->fsrc->poll_fd)) { - debug_error("poll_fd is null"); - return G_SOURCE_CONTINUE; - } + poll_fd = &focus_handle->fsrc->poll_fd; debug_log("focus_handle(%p), poll_fd(%p)", focus_handle, poll_fd); + memset(&cb_data, 0, sizeof(focus_cb_data_lib)); + if (poll_fd->revents & (POLLIN | POLLPRI)) { int changed_state = -1; @@ -1240,17 +1238,15 @@ static gboolean _focus_watch_callback_handler(gpointer user_data) debug_log(">>> _focus_watch_callback_handler(), this thread id(%u)\n", (unsigned int)pthread_self()); - memset(&cb_data, 0, sizeof(focus_cb_data_lib)); if (!focus_handle) { debug_error("focus_handle is null"); - return FALSE; - } - if (!(poll_fd = &focus_handle->fsrc->poll_fd)) { - debug_error("g_poll_fd is null"); - return FALSE; + return G_SOURCE_CONTINUE; } + poll_fd = &focus_handle->fsrc->poll_fd; debug_log("focus_handle(%p), poll_fd(%p)", focus_handle, poll_fd); + memset(&cb_data, 0, sizeof(focus_cb_data_lib)); + if (poll_fd->revents & (POLLIN | POLLPRI)) { count = read(poll_fd->fd, &cb_data, sizeof(cb_data)); if (count < 0){ diff --git a/packaging/libmm-sound.spec b/packaging/libmm-sound.spec index 5678195..c55c19a 100644 --- a/packaging/libmm-sound.spec +++ b/packaging/libmm-sound.spec @@ -1,6 +1,6 @@ Name: libmm-sound Summary: MMSound Package contains client lib and sound_server binary -Version: 0.10.104 +Version: 0.10.105 Release: 0 Group: System/Libraries License: Apache-2.0 -- 2.7.4