Fix SVACE defects 40/120640/1
authorSeungbae Shin <seungbae.shin@samsung.com>
Thu, 23 Mar 2017 11:41:30 +0000 (20:41 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Thu, 23 Mar 2017 11:41:30 +0000 (20:41 +0900)
[Version] 0.10.105
[Profile] Common
[Issue Type] Security

Change-Id: I60e738479c88a43070dd8ac71967ca57381d53eb

mm_sound_client.c
packaging/libmm-sound.spec

index c1634f7..1515874 100644 (file)
@@ -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){
index 5678195..c55c19a 100644 (file)
@@ -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