mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 19:00:02 +01:00
Allow empty passphrases when opening BitLocker devices
It's probably not possible to create a BitLocker device with an empty passphrase but we want to support it. And it's definitely better to ask for the passphrase again instead of returning ENOMEM.
This commit is contained in:
committed by
Milan Broz
parent
2fbf5cd79f
commit
5ec2fbcd38
@@ -227,6 +227,9 @@ static int passphrase_to_utf16(struct crypt_device *cd, char *input, size_t inle
|
|||||||
char *ic_outbuf = NULL;
|
char *ic_outbuf = NULL;
|
||||||
size_t r = 0;
|
size_t r = 0;
|
||||||
|
|
||||||
|
if (inlen == 0)
|
||||||
|
return r;
|
||||||
|
|
||||||
outbuf = crypt_safe_alloc(inlen * 2);
|
outbuf = crypt_safe_alloc(inlen * 2);
|
||||||
if (outbuf == NULL)
|
if (outbuf == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|||||||
Reference in New Issue
Block a user