From: Suyeon Hwang Date: Fri, 25 Jun 2021 08:03:30 +0000 (+0900) Subject: Check length of extra_info to prevent empty string X-Git-Tag: submit/tizen/20210701.200247~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c155045519e45ee781713a8962a54653f0030df;p=platform%2Fcore%2Fuifw%2Ftts.git Check length of extra_info to prevent empty string Change-Id: I68bfcb742fa2e17e111e8eae3beb4fefd94b8c1c Signed-off-by: Suyeon Hwang --- diff --git a/server/ttsd_player.c b/server/ttsd_player.c index e065150d..a1c2c0e5 100644 --- a/server/ttsd_player.c +++ b/server/ttsd_player.c @@ -236,7 +236,7 @@ void __player_focus_state_watch_cb(int id, sound_stream_focus_mask_e focus_mask, return; } - if (SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_INFORMATION == reason && NULL != extra_info && 0 == strncmp(extra_info, "TTSD_MODE_INTERRUPT", strlen(extra_info))) { + if (SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_INFORMATION == reason && NULL != extra_info && strlen(extra_info) > 0 && 0 == strncmp(extra_info, "TTSD_MODE_INTERRUPT", strlen(extra_info))) { /* If the focus is changed by "Interrupt" mode and current players of "SR" and "Noti" modes are on going, please stop all players. */ SLOG(LOG_INFO, tts_tag(), "[Player INFO] All stop the playing or the request to play. audio state(%d)", g_audio_state);