From: sooyeon.kim Date: Wed, 12 Oct 2016 09:54:02 +0000 (+0900) Subject: Add file name checker and Fix ttse_send_result X-Git-Tag: accepted/tizen/common/20161028.114810^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=856ab8e5169294b9389ccfe3565528de6e1804e4;p=platform%2Fcore%2Fuifw%2Ftts.git Add file name checker and Fix ttse_send_result Change-Id: I8ea6e326289fd1b325d9264a77531cedece21e0c Signed-off-by: sooyeon.kim --- diff --git a/common/tts_config_mgr.c b/common/tts_config_mgr.c index 1304fc0..3d7e18c 100755 --- a/common/tts_config_mgr.c +++ b/common/tts_config_mgr.c @@ -771,6 +771,9 @@ int __tts_config_mgr_get_engine_info() } if (NULL != dirp) { + if (!strcmp(".", dirp->d_name) || !strcmp("..", dirp->d_name)) + continue; + filesize = strlen(TTS_DEFAULT_ENGINE_INFO) + strlen(dirp->d_name) + 2; if (filesize >= 512) { SECURE_SLOG(LOG_ERROR, tts_tag(), "[CONFIG ERROR] File path is too long : %s", dirp->d_name); @@ -810,6 +813,9 @@ int __tts_config_mgr_get_engine_info() } if (NULL != dirp) { + if (!strcmp(".", dirp->d_name) || !strcmp("..", dirp->d_name)) + continue; + filesize = strlen(TTS_DOWNLOAD_ENGINE_INFO) + strlen(dirp->d_name) + 2; if (filesize >= 512) { SECURE_SLOG(LOG_ERROR, tts_tag(), "[CONFIG ERROR] File path is too long : %s", dirp->d_name); diff --git a/server/ttse.c b/server/ttse.c index d5ab9e9..01eb7f0 100755 --- a/server/ttse.c +++ b/server/ttse.c @@ -154,7 +154,6 @@ int ttse_send_result(ttse_result_event_e event, const void* data, unsigned int d if (NULL == data) { SLOG(LOG_ERROR, tts_tag(), "[ERROR] Input parameter is null"); - return TTSE_ERROR_INVALID_PARAMETER; } ret = ttsd_send_result(event, data, data_size, audio_type, rate, user_data);