fix TOCTOU Issue by fixing access to path check 46/256046/7 accepted/tizen/unified/20210330.111233 submit/tizen/20210330.033850
authordyamy-lee <dyamy.lee@samsung.com>
Sun, 28 Mar 2021 23:58:21 +0000 (08:58 +0900)
committerdyamy-lee <dyamy.lee@samsung.com>
Mon, 29 Mar 2021 09:41:49 +0000 (18:41 +0900)
commit7176f386b2017e151d43fc8bb8b2f98afaadf419
tree15f5988b83d72e0d02b0da8aa604408b5f5cee4f
parente9d980afe25eccb07f021166545a32b8aa505934
fix TOCTOU Issue by fixing access to path check

Calling function 'fopen' after check function like 'access' which perform check on path can cause a time-of-check, time-of-use race condition.
For resolving this, remove 'access' and just print error message of fopen() fail with errno.

Change-Id: I46b4639815b52fef1548209d703cf40d9ee6920b
base/base_gui_direct.h
fota_gui_common/fota_gr_direct_ro_common.c
fota_gui_wearable/fota_gr_direct_ro_wearable.c
recovery_gui_common/recovery_gr_direct_common.c
rw-update-ani-common/fota_gr_direct_rw_common.c
rw-update-ani-wearable/rw-update_new_fb_cairo.c