add null check to wc_Des_CbcEncrypt

This commit is contained in:
Ruby Martin
2025-07-07 14:10:41 -06:00
parent f62d0fa256
commit 7b7c658668

View File

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