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

PcgOneseq128XslRr64::jump(): Throw ValueError for negative $advance #9213

Merged
merged 4 commits into from
Aug 1, 2022

Conversation

arokettu
Copy link
Contributor

Fixes #9212

Copy link
Member

@TimWolla TimWolla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the patch! Can you add a test, similar to https://github.com/php/php-src/blob/master/ext/random/tests/02_engine/mt19937_error.phpt? pcgoneseq128xslrr64_jump_error.phpt should be an appropriate name.

@arokettu
Copy link
Contributor Author

arokettu commented Aug 1, 2022

Thank you for the patch! Can you add a test, similar to https://github.com/php/php-src/blob/master/ext/random/tests/02_engine/mt19937_error.phpt? pcgoneseq128xslrr64_jump_error.phpt should be an appropriate name.

done

Copy link
Contributor

@zeriyoshi zeriyoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good. Thanks.
I was neglecting to take this into consideration.

@TimWolla TimWolla self-assigned this Aug 1, 2022
@Girgias Girgias merged commit 50bd8ba into php:master Aug 1, 2022
@arokettu arokettu deleted the pcg64-nonnegative-advance branch August 1, 2022 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PcgOneseq128XslRr64::jump() should not allow negative $advance
5 participants