Add file name checker and Fix ttse_send_result 62/91962/2 accepted/tizen/common/20161028.114810 accepted/tizen/ivi/20161028.152747 accepted/tizen/mobile/20161028.152654 accepted/tizen/tv/20161028.152709 accepted/tizen/wearable/20161028.152727 submit/tizen/20161028.062856
authorsooyeon.kim <sooyeon.kim@samsung.com>
Wed, 12 Oct 2016 09:54:02 +0000 (18:54 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Fri, 28 Oct 2016 02:01:21 +0000 (11:01 +0900)
Change-Id: I8ea6e326289fd1b325d9264a77531cedece21e0c
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
common/tts_config_mgr.c
server/ttse.c

index 1304fc0..3d7e18c 100755 (executable)
@@ -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);
index d5ab9e9..01eb7f0 100755 (executable)
@@ -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);