v1.1.6: bugfix nesting error check

This commit is contained in:
AJ ONeal 2018-12-16 23:12:06 -07:00
parent c9cd2770a8
commit 5c81c5d49f
2 changed files with 2 additions and 1 deletions

View File

@ -67,6 +67,7 @@ ASN1.parse = function parseAsn1Helper(buf) {
iters += 1;
depth.length += 1;
child = parseAsn1(buf.slice(index, index + adjustedLen), depth);
depth.length -= 1;
// The numbers don't match up exactly and I don't remember why...
// probably something with adjustedLen or some such, but the tests pass
index += (2 + child.lengthSize + child.length);

View File

@ -1,6 +1,6 @@
{
"name": "asn1-parser",
"version": "1.1.5",
"version": "1.1.6",
"description": "An ASN.1 parser in less than 100 lines of Vanilla JavaScript, part of the Bluecrypt suite.",
"homepage": "https://git.coolaj86.com/coolaj86/asn1-parser.js",
"main": "asn1-parser.js",