mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-16 13:20:11 +01:00
Annotate LGTM TOCTOU condition.
The race here is not avoidable.
This commit is contained in:
@@ -281,7 +281,7 @@ int tools_wipe_all_signatures(const char *path)
|
||||
|
||||
/* better than opening regular file with O_EXCL (undefined) */
|
||||
/* coverity[toctou] */
|
||||
fd = open(path, flags);
|
||||
fd = open(path, flags); /* lgtm[cpp/toctou-race-condition] */
|
||||
if (fd < 0) {
|
||||
if (errno == EBUSY)
|
||||
log_err(_("Device %s is in use. Cannot proceed with format operation."), path);
|
||||
|
||||
Reference in New Issue
Block a user