From 5c81c5d49f511269e4d033595532b1e2b9b9b2c0 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sun, 16 Dec 2018 23:12:06 -0700 Subject: [PATCH] v1.1.6: bugfix nesting error check --- asn1-parser.js | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/asn1-parser.js b/asn1-parser.js index e001e88..198c85a 100644 --- a/asn1-parser.js +++ b/asn1-parser.js @@ -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); diff --git a/package.json b/package.json index 3c9cdf8..aaa69ce 100644 --- a/package.json +++ b/package.json @@ -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",