Adds checking a invalid handle 34/229834/2 submit/tizen/20200406.030837 submit/tizen/20200407.002130
authorJaechul Lee <jcsing.lee@samsung.com>
Mon, 6 Apr 2020 01:53:32 +0000 (10:53 +0900)
committerJaechul Lee <jcsing.lee@samsung.com>
Mon, 6 Apr 2020 02:21:13 +0000 (11:21 +0900)
It needs to check the handle that is returned from pulseaudio.

[Version] 0.12.69
[Issue Type] Bug

Change-Id: I245579aa282452dba352ad6356b882d072a894d3
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
mm_sound_proxy.c
packaging/libmm-sound.spec

index ba97be47055f4d07fdbc8cc73242be2341ad8dd6..8a8d9264d0fc48e35ebf14485c9adfbf2e2352aa 100644 (file)
@@ -954,9 +954,13 @@ int mm_sound_proxy_play_sound_with_stream_info(const char* filename, int repeat,
        }
 
        if (result) {
-               g_variant_get(result, "(i)",  &handle);
-               debug_log("handle : %d", handle);
-               *codechandle = handle;
+               g_variant_get(result, "(i)", &handle);
+               if (handle < 0) {
+                       debug_log("handle is invalid : %d", handle);
+                       ret = MM_ERROR_SOUND_INTERNAL;
+               } else {
+                       *codechandle = handle;
+               }
                g_variant_unref(result);
        } else {
                debug_error("reply null");
index 3eb158fe110204b01c1cb9ee33aa454f179e16a5..6acef707e1c4df08b91961d228d165c8ad700362 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-sound
 Summary:    MMSound Package contains client lib and sound_server binary
-Version:    0.12.68
+Version:    0.12.69
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0