mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 19:00:02 +01:00
Fail gracefully if name is NULL in crypt_init_by_name() & co
This commit is contained in:
committed by
Milan Broz
parent
b27507790f
commit
a6106117a9
@@ -1121,6 +1121,9 @@ int crypt_init_by_name_and_header(struct crypt_device **cd,
|
||||
struct crypt_dm_active_device dmd;
|
||||
int r;
|
||||
|
||||
if (!name)
|
||||
return -EINVAL;
|
||||
|
||||
log_dbg("Allocating crypt device context by device %s.", name);
|
||||
|
||||
ci = crypt_status(NULL, name);
|
||||
|
||||
Reference in New Issue
Block a user