mirror of
https://github.com/systemd/systemd.git
synced 2024-10-31 16:21:26 +03:00
cryptsetup: check that password is not null
Beef up the assert to protect against passing null to strlen. Found with scan-build.
This commit is contained in:
parent
f8b5d99408
commit
f268f57f63
@ -344,7 +344,7 @@ static int attach_tcrypt(struct crypt_device *cd,
|
||||
|
||||
assert(cd);
|
||||
assert(name);
|
||||
assert(key_file || passwords);
|
||||
assert(key_file || (passwords && passwords[0]));
|
||||
|
||||
if (arg_tcrypt_hidden)
|
||||
params.flags |= CRYPT_TCRYPT_HIDDEN_HEADER;
|
||||
|
Loading…
Reference in New Issue
Block a user