Fix SVACE defects 99/74499/1
authorSeungbae Shin <seungbae.shin@samsung.com>
Tue, 14 Jun 2016 10:47:50 +0000 (19:47 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Tue, 14 Jun 2016 10:48:35 +0000 (19:48 +0900)
[Version] Release 0.10.35
[Profile] Common
[Issue Type] Security

Change-Id: Ib629a75aecac65ece6ef0225ee32f78812fc6df3

focus_server/mm_sound_mgr_focus.c
focus_server/mm_sound_mgr_focus_dbus.c
mm_sound_pa_client.c
packaging/libmm-sound.spec
server/mm_sound_mgr_ipc_dbus.c

index a6b2e50..a52513e 100644 (file)
@@ -310,6 +310,7 @@ static int _mm_sound_mgr_focus_do_watch_callback(focus_type_e focus_type, focus_
 
                                pfd.fd = fd_FOCUS_R;
                                pfd.events = POLLIN;
+                               pfd.revents = 0;
 
                                /*********************************************
                                 *
@@ -485,6 +486,7 @@ int _mm_sound_mgr_focus_do_callback(focus_command_e command, focus_node_t *victi
 
        pfd.fd = fd_FOCUS_R;
        pfd.events = POLLIN;
+       pfd.revents = 0;
 
        /*********************************************
         *
index 7cea3b7..2ef6d02 100644 (file)
@@ -227,7 +227,7 @@ static const char* _convert_error_code(int err_code)
 static int _get_sender_pid(GDBusMethodInvocation* invocation)
 {
        GVariant* value;
-       guint pid;
+       guint pid = 0;
        const gchar* sender;
        GDBusConnection * connection = NULL;
        GError* err = NULL;
index 77ea042..3cf52c5 100644 (file)
@@ -175,7 +175,8 @@ int mm_sound_pa_open(MMSoundHandleMode mode, mm_sound_handle_route_info *route_i
     pa_channel_map maps;
     pa_buffer_attr attr;
 
-    int prop_vol_type, prop_gain_type = VOLUME_GAIN_DEFAULT;
+    int prop_vol_type = 0;
+    int prop_gain_type = VOLUME_GAIN_DEFAULT;
 
     int err = MM_ERROR_SOUND_INTERNAL;
     int period_time = PA_SIMPLE_PERIOD_TIME_FOR_MID_LATENCY_MSEC;
@@ -387,7 +388,7 @@ int mm_sound_pa_open(MMSoundHandleMode mode, mm_sound_handle_route_info *route_i
     }
 
     handle = (mm_sound_handle_t*)malloc(sizeof(mm_sound_handle_t));
-
+    memset(handle, 0, sizeof(mm_sound_handle_t));
     handle->mode = mode;
     handle->policy = policy;
     handle->volume_type = prop_vol_type;
index aa9861f..c4bb425 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-sound
 Summary:    MMSound Package contains client lib and sound_server binary
-Version:    0.10.34
+Version:    0.10.35
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index b7c68b1..229b46f 100644 (file)
@@ -221,7 +221,7 @@ static int mm_sound_mgr_ipc_dbus_send_signal(audio_event_t event, GVariant *para
 static int _get_sender_pid(GDBusMethodInvocation* invocation)
 {
        GVariant* value;
-       guint pid;
+       guint pid = 0;
        const gchar* sender;
        GDBusConnection * connection = NULL;
        GError* err = NULL;