pkcs5: Fail decryption if data is empty

This avoids the previous bug early.
This commit is contained in:
Tobias Brunner
2026-04-21 16:48:56 +02:00
parent 4da84019cc
commit c6a2185c42
+1 -1
View File
@@ -349,7 +349,7 @@ METHOD(pkcs5_t, decrypt, bool,
chunk_t keymat, key, iv;
derive_t kdf;
if (!ensure_crypto_primitives(this, data) || !decrypted)
if (!data.len || !ensure_crypto_primitives(this, data) || !decrypted)
{
return FALSE;
}