Handle the special case of an invalid non-child primitive value #1

已關閉
coolaj862018-11-26 21:44:33 +00:00建立 · 1 comment
管理員

Example of malformed data:

-----BEGIN PUBLIC KEY-----
BEleay9rUXWPOlAucJVcPgPTrGfxKiDJe5MStHHKu4gaJqDloeAJwtiC9T3+H02QhmoQ0xjmIIvozvcUO4mUvW0
-----END PUBLIC KEY-----

This should fail to parse because it appears to contain a primitive value and that value's length is much longer that the data that's put in.

Also:

-----BEGIN PUBLIC KEY-----
BOCi/0nLmTodhUUbI+GIyRxWvk8JaBu8HCFy46FJ/qO2hcfVPrUhXs5T3I2m6S2Jt65mDPS44EmIO0OCiRVbcXCvD6WjEC2+TirJ291sFVreisQvguuuKfLtnuVNhhfV7w
-----END PUBLIC KEY-----

the lenlen is longer than the whole string

Example of malformed data: ``` -----BEGIN PUBLIC KEY----- BEleay9rUXWPOlAucJVcPgPTrGfxKiDJe5MStHHKu4gaJqDloeAJwtiC9T3+H02QhmoQ0xjmIIvozvcUO4mUvW0 -----END PUBLIC KEY----- ``` This should fail to parse because it appears to contain a primitive value and that value's length is much longer that the data that's put in. Also: ``` -----BEGIN PUBLIC KEY----- BOCi/0nLmTodhUUbI+GIyRxWvk8JaBu8HCFy46FJ/qO2hcfVPrUhXs5T3I2m6S2Jt65mDPS44EmIO0OCiRVbcXCvD6WjEC2+TirJ291sFVreisQvguuuKfLtnuVNhhfV7w -----END PUBLIC KEY----- ``` the `lenlen` is longer than the whole string
Author
管理員

Fixed it last night.

Fixed it last night.
登入 才能加入這對話。
未選擇標籤
未選擇里程碑
No Assignees
1 參與者
訊息
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coolaj86/asn1-parser.js#1
No description provided.