1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:27:45 +00:00

LibCrypto: Do not assume that the passed in IV is as long as a block

Just take ReadonlyBytes instead of a raw pointer.
Fixes #7072 (tested with the ASAN build fixed by #7060).
This commit is contained in:
Ali Mohammad Pur 2021-05-14 09:32:24 +04:30 committed by Linus Groh
parent e96451edc9
commit a4e20a87d5
5 changed files with 13 additions and 13 deletions

View file

@ -168,7 +168,7 @@ protected:
cipher.encrypt_block(m_cipher_block, m_cipher_block);
if (in) {
m_cipher_block.apply_initialization_vector(in->data() + offset);
m_cipher_block.apply_initialization_vector(in->slice(offset));
}
auto write_size = min(block_size, length);