From f073721856bbac1d427f87520a9cfb6c3fa08c5d Mon Sep 17 00:00:00 2001 From: Stefan Esser Date: Mon, 9 Jun 2014 10:54:54 +0200 Subject: Document new rand/mt_rand features Add reseeding on srand/mt_srand if ignore is activated --- execute.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'execute.c') diff --git a/execute.c b/execute.c index 103a8bf..1f7cf15 100644 --- a/execute.c +++ b/execute.c @@ -1452,6 +1452,9 @@ static int ih_srand(IH_HANDLER_PARAMS) long seed; if (zend_parse_parameters(argc TSRMLS_CC, "|l", &seed) == FAILURE || SUHOSIN_G(srand_ignore)) { + if (SUHOSIN_G(srand_ignore)) { + SUHOSIN_G(r_is_seeded) = 0; + } return (1); } @@ -1469,6 +1472,9 @@ static int ih_mt_srand(IH_HANDLER_PARAMS) long seed; if (zend_parse_parameters(argc TSRMLS_CC, "|l", &seed) == FAILURE || SUHOSIN_G(mt_srand_ignore)) { + if (SUHOSIN_G(mt_srand_ignore)) { + SUHOSIN_G(mt_is_seeded) = 0; + } return (1); } -- cgit v1.3