summaryrefslogtreecommitdiff
path: root/execute.c
diff options
context:
space:
mode:
authorStefan Esser2014-06-09 10:54:54 +0200
committerStefan Esser2014-06-09 10:54:54 +0200
commitf073721856bbac1d427f87520a9cfb6c3fa08c5d (patch)
tree098f0233f55028b7c9a217fae80b9e1efb7b6a8a /execute.c
parent85e4bb9e6255a13dcb89bdaf47b6434c49a61333 (diff)
Document new rand/mt_rand features
Add reseeding on srand/mt_srand if ignore is activated
Diffstat (limited to '')
-rw-r--r--execute.c6
1 files changed, 6 insertions, 0 deletions
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)
1452 long seed; 1452 long seed;
1453 1453
1454 if (zend_parse_parameters(argc TSRMLS_CC, "|l", &seed) == FAILURE || SUHOSIN_G(srand_ignore)) { 1454 if (zend_parse_parameters(argc TSRMLS_CC, "|l", &seed) == FAILURE || SUHOSIN_G(srand_ignore)) {
1455 if (SUHOSIN_G(srand_ignore)) {
1456 SUHOSIN_G(r_is_seeded) = 0;
1457 }
1455 return (1); 1458 return (1);
1456 } 1459 }
1457 1460
@@ -1469,6 +1472,9 @@ static int ih_mt_srand(IH_HANDLER_PARAMS)
1469 long seed; 1472 long seed;
1470 1473
1471 if (zend_parse_parameters(argc TSRMLS_CC, "|l", &seed) == FAILURE || SUHOSIN_G(mt_srand_ignore)) { 1474 if (zend_parse_parameters(argc TSRMLS_CC, "|l", &seed) == FAILURE || SUHOSIN_G(mt_srand_ignore)) {
1475 if (SUHOSIN_G(mt_srand_ignore)) {
1476 SUHOSIN_G(mt_is_seeded) = 0;
1477 }
1472 return (1); 1478 return (1);
1473 } 1479 }
1474 1480