mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
src/bin: fix possible toctou in erase
Found by Coverity Scan Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -26,10 +26,6 @@ static int do_erase(const char *path)
|
||||
}
|
||||
|
||||
cfg_adjust(path, NULL, fn, len);
|
||||
if (access(fn, F_OK)) {
|
||||
fprintf(stderr, "No such file: %s\n", fn);
|
||||
return -1;
|
||||
}
|
||||
} else
|
||||
fn = (char *)path;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user