-
-
Notifications
You must be signed in to change notification settings - Fork 804
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
fix[codegen]: overflow check in slice()
#3818
fix[codegen]: overflow check in slice()
#3818
Conversation
slice()
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.
Requires a test
actually i forgot to put this back into draft since i haven't had time to look into the test failures yet |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #3818 +/- ##
==========================================
- Coverage 86.33% 86.05% -0.28%
==========================================
Files 92 92
Lines 14010 14024 +14
Branches 3077 3081 +4
==========================================
- Hits 12096 12069 -27
- Misses 1484 1523 +39
- Partials 430 432 +2 ☔ View full report in Codecov by Sentry. |
the buffer out-of-bounds check in slice() does not take into account the possibility for arithmetic overflow. this commit fixes the oob check by adding an overflow check. it also refactors the slice check into a helper function, and adds relevant tests. patches GHSA-9x7f-gwxq-6f2c. --------- Co-authored-by: cyberthirst <[email protected]>
What I did
fix #3756
How I did it
How to verify it
Commit message
Description for the changelog
Cute Animal Picture