-
Notifications
You must be signed in to change notification settings - Fork 59
feat(solana): validate chunk_count in assemble instructions #860
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: srdtrk <srdtrk@hotmail.com>
Co-authored-by: Mariusz Zak <mariuszzak21@gmail.com> Co-authored-by: srdtrk <srdtrk@hotmail.com>
Co-authored-by: Gjermund Garaba <gjermund@garaba.net>
Co-authored-by: srdtrk <59252793+srdtrk@users.noreply.github.com>
Co-authored-by: Gjermund Garaba <gjermund@garaba.net>
Co-authored-by: Gjermund Garaba <gjermund@garaba.net> Co-authored-by: Dmytro Onypko <vaporif@proton.me> Co-authored-by: srdtrk <59252793+srdtrk@users.noreply.github.com> Co-authored-by: srdtrk <srdtrk@hotmail.com>
Co-authored-by: Gjermund Garaba <gjermund@garaba.net> Co-authored-by: Mariusz Żak <mariuszzak21@gmail.com> Co-authored-by: srdtrk <59252793+srdtrk@users.noreply.github.com> Co-authored-by: srdtrk <srdtrk@hotmail.com>
Co-authored-by: Gjermund Garaba <gjermund@garaba.net> Co-authored-by: Mariusz Żak <mariuszzak21@gmail.com> Co-authored-by: srdtrk <59252793+srdtrk@users.noreply.github.com> Co-authored-by: srdtrk <srdtrk@hotmail.com> Co-authored-by: Coder <161350311+MamunC0der@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/solana #860 +/- ##
==============================================
Coverage ? 99.87%
==============================================
Files ? 18
Lines ? 779
Branches ? 0
==============================================
Hits ? 778
Misses ? 1
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| let chunk_count = chunk_count as usize; | ||
|
|
||
| require!( | ||
| chunk_count > 0 && chunk_count <= ctx.remaining_accounts.len(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chunk count should never be less than remaining accounts, it's ok if it's equal - means we have no preverifies
vaporif
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment
Description
Add extra validations to avoid panics on
[..chunk_count]Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
godoccomments.Files changedin the GitHub PR explorer.SonarCloud Reportin the comment section below once CI passes.