From: Jaechul Lee Date: Mon, 6 Apr 2020 01:53:32 +0000 (+0900) Subject: Adds checking a invalid handle X-Git-Tag: submit/tizen/20200406.030837^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f47c9a762f08bb72ac424cc4c2c8730e2bd9c0d0;p=platform%2Fcore%2Fmultimedia%2Flibmm-sound.git Adds checking a invalid handle 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 --- diff --git a/mm_sound_proxy.c b/mm_sound_proxy.c index ba97be4..8a8d926 100644 --- a/mm_sound_proxy.c +++ b/mm_sound_proxy.c @@ -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"); diff --git a/packaging/libmm-sound.spec b/packaging/libmm-sound.spec index 3eb158f..6acef70 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.12.68 +Version: 0.12.69 Release: 0 Group: System/Libraries License: Apache-2.0