forked from wolfSSL/wolfssl
add sanity check on des cbc decrypt, CID 512990
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user