There is a stat(pathname) followed by open(pathname). Code scanning alerts this as a possible TOCTOU if the file was modified between these two calls.
This patch removes the stat(), as it is only used for validating file existence, which open() also performs.
There is a stat(pathname) followed by open(pathname). Code scanning alerts this as a possible TOCTOU if the file was modified between these two calls. This patch removes the stat(), as it is only used for validating file existence, which open() also performs.
https://github.com/deislabs/mystikos/security/code-scanning/4137