Skip to content

Commit e6f9878

Browse files
committed
fixup! Handle zero seed in Xoshiro256**
1 parent 528feaf commit e6f9878

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/random/engine_xoshiro256starstar.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ PHP_METHOD(Random_Engine_Xoshiro256StarStar, __construct)
227227

228228
if (t[0] == 0 && t[1] == 0 && t[2] == 0 && t[3] == 0) {
229229
zend_argument_value_error(1, "must not consist entirely of NUL bytes");
230+
RETURN_THROWS();
230231
}
231232

232233
seed256(engine->status, t[0], t[1], t[2], t[3]);

0 commit comments

Comments
 (0)