Skip to content

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

Closed

Description

@arokettu

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

Activity

  1. self-assigned this
    on Jul 31, 2022
  2. added a commit that references this issue on Aug 1, 2022
    50bd8ba
  3. changed the title [-]PcgOneseq128XslRr64::jump should not allow negative $advance[/-] [+]PcgOneseq128XslRr64::jump() should not allow negative $advance[/+] on Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions