bitlocker: Handle getting NULL passwords

This commit is contained in:
Kfir Kahanov
2025-11-02 23:43:36 +02:00
parent f304132b2b
commit 72173b2777

View File

@@ -1132,6 +1132,9 @@ static int bitlk_kdf(const char *password,
int i = 0; int i = 0;
int r = 0; int r = 0;
if (!password)
return -EINVAL;
memcpy(kdf.salt, salt, 16); memcpy(kdf.salt, salt, 16);
r = crypt_hash_init(&hd, BITLK_KDF_HASH); r = crypt_hash_init(&hd, BITLK_KDF_HASH);