Skip to content

Conversation

@ibukanov
Copy link

@ibukanov ibukanov commented Feb 1, 2025

Do not build an intermediate tree presentation of BER format in ber2der. Rather write the data directly to the output array patching the length header as necessary.

Protect against int32 overflow on 32-bit CPU when calculating the BER content length.

Detect and report invalid BER when a fixed length of the sequence does not match the actual length of children.

Name of feature:

Stricter definite length handling in BER data.

Pain or issue this feature alleviates:

Invalid BER data generator can be detected.

Why is this important to the project (if not answered above):

Is there documentation on how to use this feature? If so, where?

In what environments or workflows is this feature supported?

In what environments or workflows is this feature explicitly NOT supported (if any)?

Supporting links/other PRs/issues:

💔Thank you!

Do not build an intermediate tree presentation of BER format in ber2der. Rather
write the data directly to the output array patching the length header as
necessary.

Protect against int32 overflow on 32-bit CPU when calculating the BER content
length.

Detect and report invalid BER when a fixed length of the sequence does not match
the actual length of children.
@hslatman
Copy link
Member

Hey @ibukanov, thank you for working on this. This looks like a great improvement! I need some time to grok it all for proper review 😅

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants