From: Suyeon Hwang Date: Fri, 21 May 2021 06:22:50 +0000 (+0900) Subject: Remove access function to avoid toctou problem X-Git-Tag: accepted/tizen/unified/20210629.130203~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=62567ff1c38ba075894d1e15859fcc60229f5076;p=platform%2Fcore%2Fuifw%2Ftts.git Remove access function to avoid toctou problem Change-Id: I8291353ba9770a470a35cccaddc8a0d6cb8f20ea Signed-off-by: Suyeon Hwang --- diff --git a/engine-parser/src/tts-engine-parser.c b/engine-parser/src/tts-engine-parser.c index a9e2789..05caa3a 100644 --- a/engine-parser/src/tts-engine-parser.c +++ b/engine-parser/src/tts-engine-parser.c @@ -325,11 +325,9 @@ static int __remove_engine_info_xml(const char *pkgid, gchar *ut, uid_t uid) char path[256] = {'\0',}; snprintf(path, 256, "%s/%s.xml", dir_engine_info, pkgid); - if (0 == access(path, F_OK)) { - LOGD("Remove engine info xml(%s)", path); - if (0 != remove(path)) { - LOGE("[ERROR] Fail to Remove engine info xml(%s)", path); - } + LOGD("Remove engine info xml(%s)", path); + if (0 != remove(path)) { + LOGE("[ERROR] Fail to Remove engine info xml(%s)", path); } FREE(dir_engine_info)