Skip to content

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

Closed
@arokettu

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions