diff options
| author | Stefan Esser | 2014-06-09 10:54:54 +0200 |
|---|---|---|
| committer | Stefan Esser | 2014-06-09 10:54:54 +0200 |
| commit | f073721856bbac1d427f87520a9cfb6c3fa08c5d (patch) | |
| tree | 098f0233f55028b7c9a217fae80b9e1efb7b6a8a /execute.c | |
| parent | 85e4bb9e6255a13dcb89bdaf47b6434c49a61333 (diff) | |
Document new rand/mt_rand features
Add reseeding on srand/mt_srand if ignore is activated
Diffstat (limited to '')
| -rw-r--r-- | execute.c | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -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 | ||
