add sanity check on des cbc decrypt, CID 512990

pull/8711/head
JacobBarthelmeh 2025-04-23 17:11:05 -06:00
parent f96e493790
commit 6f1fe2e4b9
1 changed files with 4 additions and 0 deletions

View File

@ -1742,6 +1742,10 @@
{
word32 blocks = sz / DES_BLOCK_SIZE;
if (des == NULL || out == NULL || in == NULL) {
return BAD_FUNC_ARG;
}
while (blocks--) {
XMEMCPY(des->tmp, in, DES_BLOCK_SIZE);
DesProcessBlock(des, (byte*)des->tmp, out);