mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-14 12:20:00 +01:00
Fixes and workarounds for some Coverity scan reports.
This commit is contained in:
@@ -966,6 +966,7 @@ static int action_luksFormat(void)
|
||||
return -EPERM;
|
||||
|
||||
log_dbg("Creating header file.");
|
||||
/* coverity[toctou] */
|
||||
fd = open(opt_header_device, O_CREAT|O_EXCL|O_WRONLY, S_IRUSR|S_IWUSR);
|
||||
if (fd == -1 || posix_fallocate(fd, 0, 4096))
|
||||
log_err(_("Cannot create header file %s."), opt_header_device);
|
||||
|
||||
Reference in New Issue
Block a user