pkcs5: Fail decryption if data is empty
This avoids the previous bug early.
This commit is contained in:
1 parent
4da84019cc
commit
c6a2185c42
1 file changed
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user