Skip to content

Add discriminator length checks#1678

Merged
paul-schaaf merged 2 commits into
otter-sec:masterfrom
smoelius:discriminator-length-checks
Mar 24, 2022
Merged

Add discriminator length checks#1678
paul-schaaf merged 2 commits into
otter-sec:masterfrom
smoelius:discriminator-length-checks

Conversation

@smoelius

Copy link
Copy Markdown
Contributor

This PR adds discriminator length checks in a few places where they appear to be missing.

@paul-schaaf

Copy link
Copy Markdown
Contributor

this is not a vulnerability because the array_ref will fail if the data is shorter than the discriminator but an error msg is still better than a panic!

@smoelius

Copy link
Copy Markdown
Contributor Author

@paul-schaaf I agree with what you said.

@paul-schaaf paul-schaaf merged commit 0f7675c into otter-sec:master Mar 24, 2022
@paul-schaaf

Copy link
Copy Markdown
Contributor

Thanks for the contribution!

@smoelius smoelius deleted the discriminator-length-checks branch March 24, 2022 16:18
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
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.

2 participants