Avoid to use stat() function 44/255944/1 accepted/tizen/unified/20210511.072805 submit/tizen/20210510.015709
authorSeonah Moon <seonah1.moon@samsung.com>
Thu, 25 Mar 2021 07:54:27 +0000 (16:54 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Thu, 25 Mar 2021 07:54:35 +0000 (16:54 +0900)
commitf9c71c34f2840263da0bb9b71e53b615b267bafc
tree051e7d102199bf0bdeaa659157bfc55f247176ff
parent0211d8ec6f68931f01eaa65ec4f2989f3efdf3cd
Avoid to use stat() function

Doing something after checking of the state of a file has a potential
race condition bug. It is more effiecient that just using execption
handling instead of checking to prevent TOCTOU.

Change-Id: I2a2560d9d49ed9d52008557f0d2f89fa04bb130d
packaging/download-provider.spec
provider/download-provider-notify.c
provider/download-provider-plugin-download-agent.c