Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AsnFormatter.TestInputString throws exception when input string is less than 9 chars #24

Open
Crypt32 opened this issue Mar 6, 2025 · 0 comments · May be fixed by #23
Open

AsnFormatter.TestInputString throws exception when input string is less than 9 chars #24

Crypt32 opened this issue Mar 6, 2025 · 0 comments · May be fixed by #23

Comments

@Crypt32
Copy link
Collaborator

Crypt32 commented Mar 6, 2025

This happens because of missing boundary check in AsnFormatter.TestInputString:

Int32 start = input.IndexOf(header, StringComparison.Ordinal) + 10;
Int32 headerEndPos = input.IndexOf("-----", start, StringComparison.Ordinal) + 5;

@Crypt32 Crypt32 added the bug Bug. An issue exist in our code. label Mar 6, 2025
@Crypt32 Crypt32 linked a pull request Mar 6, 2025 that will close this issue
Crypt32 added a commit that referenced this issue Mar 6, 2025
…and clarifies the behavior of conversion rules and expectations. Added unit tests to cover `AsnFormatter.TestInputString` for Base64 encodings
@Crypt32 Crypt32 removed the bug Bug. An issue exist in our code. label Mar 14, 2025
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 a pull request may close this issue.

1 participant