Skip to content

Commit 2f24b35

Browse files
committed
added check that checks if the SEQ's length is > than the buff's length
1 parent 92806a6 commit 2f24b35

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/ssl_load.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ static int DataToDerBuffer(const unsigned char* buff, word32 len, int format,
160160
else {
161161
ret = ASN_PARSE_E;
162162
}
163+
164+
if (info->consumed > (int)len) {
165+
ret = ASN_PARSE_E;
166+
}
163167
if (ret == 0) {
164168
ret = AllocCopyDer(der, buff, (word32)info->consumed, type, heap);
165169
}

0 commit comments

Comments
 (0)