JavaScript generic ASN.1 parser (mirror)
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fail fast when content is longer than the stream contains. This is inspired by Luís Câmara's work in PR #21. Closes #17 and #21 on GitHub.

+2
+2
asn1.js
··· 412 412 if (len !== null) { 413 413 // definite length 414 414 var end = start + len; 415 + if (end > stream.enc.length) 416 + throw 'Container at offset ' + start + ' has a length of ' + len + ', which is past the end of the stream'; 415 417 while (stream.pos < end) 416 418 sub[sub.length] = ASN1.decode(stream); 417 419 if (stream.pos != end)