From 3a79483f714184e35ba9ec3f842253db7f0de00e Mon Sep 17 00:00:00 2001 From: "aravind.gara" Date: Thu, 2 Nov 2017 19:08:05 +0900 Subject: [PATCH] Fix Coverity Issues-2 Fix local issues got by Coverity script [Version] 0.0.11 [Issue Type] Security Change-Id: Ic4c0988e39e7224fee03804166fe981a865955f5 Signed-off-by: aravind.gara --- packaging/capi-media-sound-pool.spec | 2 +- test/proxy/src/proxy.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packaging/capi-media-sound-pool.spec b/packaging/capi-media-sound-pool.spec index a6bfafd..34b0b57 100644 --- a/packaging/capi-media-sound-pool.spec +++ b/packaging/capi-media-sound-pool.spec @@ -1,5 +1,5 @@ Name: capi-media-sound-pool -Version: 0.0.10 +Version: 0.0.11 Summary: Tizen Sound Pool module Release: 0 Group: Multimedia/Framework diff --git a/test/proxy/src/proxy.c b/test/proxy/src/proxy.c index 1719b75..a9c3afa 100644 --- a/test/proxy/src/proxy.c +++ b/test/proxy/src/proxy.c @@ -680,7 +680,7 @@ static int __proxy_sound_pool_load_source_from_file(const char *pars) /* If tag wasn't specified by the user, we will use file path as a tag */ if (tag[0] == '\0') - strncpy(tag, fname, MAX_PATH_LEN); + strncpy(tag, fname, MAX_PATH_LEN - 1); _logger_log_info(CMD_LOAD_SOURCE " command was called"); _logger_log_info("Loading source to the pool with %zu identifier from %s file. " @@ -1064,8 +1064,6 @@ static int __proxy_sound_pool_get_stream_state(const char *pars) /* CMD_SLEEP */ static int __proxy_sleep(const char *pars) { - int ret = SOUND_POOL_ERROR_NONE; - useconds_t stime = 0; if ((pars == NULL) || (sscanf(pars, " %u", &stime) < 1)) { @@ -1080,7 +1078,7 @@ static int __proxy_sleep(const char *pars) usleep(stime); _logger_log_info("Main thread sleep has been finished...", stime); - return (ret == SOUND_POOL_ERROR_NONE ? OK : FAIL); + return OK; } /* CMD_EXECUTE_SCRIPT */ -- 2.7.4