Skip to content

Commit 38027e7

Browse files
add sanity check on des cbc decrypt, CID 512990
1 parent 9db56fd commit 38027e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

wolfcrypt/src/des3.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,6 +1742,10 @@
17421742
{
17431743
word32 blocks = sz / DES_BLOCK_SIZE;
17441744

1745+
if (des == NULL || out == NULL || in == NULL) {
1746+
return BAD_FUNC_ARG;
1747+
}
1748+
17451749
while (blocks--) {
17461750
XMEMCPY(des->tmp, in, DES_BLOCK_SIZE);
17471751
DesProcessBlock(des, (byte*)des->tmp, out);

0 commit comments

Comments
 (0)