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

Fix out-of-bounds inc() in detail::advance #134

Merged
merged 2 commits into from
Nov 28, 2023
Merged

Fix out-of-bounds inc() in detail::advance #134

merged 2 commits into from
Nov 28, 2023

Conversation

tcbrindle
Copy link
Owner

@tcbrindle tcbrindle commented Nov 27, 2023

If we passed a positive offset to the non-RA version of advance(), we were performing an initial inc() on the passed-in cursor without first checking whether it was at the end.

So let's not do that.

Fixes #132

Copy link

codecov bot commented Nov 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bc97bee) 97.70% compared to head (173aa9d) 97.70%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #134   +/-   ##
=======================================
  Coverage   97.70%   97.70%           
=======================================
  Files          67       67           
  Lines        2398     2400    +2     
=======================================
+ Hits         2343     2345    +2     
  Misses         55       55           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

If we passed a positive offset to the non-RA version of advance(), we were performing an inc() on the passed-in cursor without first checking whether it was at the end.

So let's not do that.

Fixes #132
...and a few other #includes just to be on the safe side
@tcbrindle tcbrindle merged commit 7b4cdf6 into main Nov 28, 2023
27 checks passed
@tcbrindle tcbrindle deleted the pr/fix_132 branch December 8, 2023 16:52
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.

Dropping from an empty sequence asserts
1 participant