}
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);
}
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);
g_config_info->engine_id = strdup(engine);
- if (NULL != g_config_info->setting) {
- free(g_config_info->setting);
- g_config_info->setting = NULL;
- }
-
if (NULL != engine_info->setting) {
+ if (NULL != g_config_info->setting) {
+ free(g_config_info->setting);
+ g_config_info->setting = NULL;
+ }
g_config_info->setting = strdup(engine_info->setting);
}