mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 10:50:01 +01:00
Fix possible use of uninitialized variable.
device_tag_size variable was not initialized and used when device_is_nop_dif returned negative error code.
This commit is contained in:
@@ -3045,7 +3045,11 @@ int crypt_format_inline(struct crypt_device *cd,
|
|||||||
iparams->journal_integrity_key_size))
|
iparams->journal_integrity_key_size))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (!device_is_nop_dif(idevice, &device_tag_size)) {
|
r = device_is_nop_dif(idevice, &device_tag_size);
|
||||||
|
if (r < 0)
|
||||||
|
return r;
|
||||||
|
|
||||||
|
if (!r) {
|
||||||
log_err(cd, _("Device %s does not provide inline integrity data fields."), mdata_device_path(cd));
|
log_err(cd, _("Device %s does not provide inline integrity data fields."), mdata_device_path(cd));
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user