Skip to content

Commit

Permalink
added check that checks if the SEQ's length is > than the buff's length
Browse files Browse the repository at this point in the history
  • Loading branch information
gasbytes committed May 15, 2024
1 parent 92806a6 commit 2f24b35
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ssl_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ static int DataToDerBuffer(const unsigned char* buff, word32 len, int format,
else {
ret = ASN_PARSE_E;
}

if (info->consumed > (int)len) {
ret = ASN_PARSE_E;
}
if (ret == 0) {
ret = AllocCopyDer(der, buff, (word32)info->consumed, type, heap);
}
Expand Down

0 comments on commit 2f24b35

Please sign in to comment.