Skip to content

Commit 7b7c658

Browse files
committed
add null check to wc_Des_CbcEncrypt
1 parent f62d0fa commit 7b7c658

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

wolfcrypt/src/des3.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,6 +1727,10 @@
17271727
{
17281728
word32 blocks = sz / DES_BLOCK_SIZE;
17291729

1730+
if (des == NULL || out == NULL || in == NULL) {
1731+
return BAD_FUNC_ARG;
1732+
}
1733+
17301734
while (blocks--) {
17311735
xorbuf((byte*)des->reg, in, DES_BLOCK_SIZE);
17321736
DesProcessBlock(des, (byte*)des->reg, (byte*)des->reg);

0 commit comments

Comments
 (0)