[go: up one dir, main page]

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() should not allow negative $advance #9212

Closed
arokettu opened this issue Jul 31, 2022 · 0 comments · Fixed by #9213
Closed

PcgOneseq128XslRr64::jump() should not allow negative $advance #9212

arokettu opened this issue Jul 31, 2022 · 0 comments · Fixed by #9213

Comments

@arokettu
Copy link
Contributor

Description

As discussed in internals: https://externals.io/message/118328

The following code:

<?php
$engine = new \Random\Engine\PcgOneseq128XslRr64();
$engine->advance(-1);

advances the engine 2**64 - 1 steps due to unsigned int cast but it should throw a ValueError instead

PHP Version

PHP 8.2.0 beta 1

Operating System

No response

@TimWolla TimWolla self-assigned this Jul 31, 2022
Girgias pushed a commit that referenced this issue Aug 1, 2022
@TimWolla TimWolla changed the title PcgOneseq128XslRr64::jump should not allow negative $advance PcgOneseq128XslRr64::jump() should not allow negative $advance Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants