mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-06 00:10:04 +01:00
Add some fixes and workarounds for gcc-11 static analyzer.
Not everything is a real bug (false positive rate is very high here), but the code is actually more readable.
This commit is contained in:
@@ -2296,8 +2296,13 @@ static int _dm_target_query_verity(struct crypt_device *cd,
|
||||
str = strsep(¶ms, " ");
|
||||
if (!str)
|
||||
goto err;
|
||||
if (!root_hash_sig_key_desc)
|
||||
if (!root_hash_sig_key_desc) {
|
||||
root_hash_sig_key_desc = strdup(str);
|
||||
if (!root_hash_sig_key_desc) {
|
||||
r = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
if (vp)
|
||||
vp->flags |= CRYPT_VERITY_ROOT_HASH_SIGNATURE;
|
||||
|
||||
Reference in New Issue
Block a user