diff options
| author | jvoisin | 2022-03-20 18:20:45 +0100 |
|---|---|---|
| committer | jvoisin | 2022-03-20 18:20:45 +0100 |
| commit | 81dd7f2ef07af306fe83d7755cbac4529aa9fc8d (patch) | |
| tree | 32cc44c6231b30db5ac7b15699297863460784aa /src/sp_harden_rand.c | |
| parent | 83b01942dfc80474cc05e09aeef4b44307a7120b (diff) | |
| parent | c38df1077a6c1dfbca1baca049214d053e2e7684 (diff) | |
Merge remote-tracking branch 'sektioneins/master'
Diffstat (limited to 'src/sp_harden_rand.c')
| -rw-r--r-- | src/sp_harden_rand.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sp_harden_rand.c b/src/sp_harden_rand.c index 43c2a5b..3e9bcb3 100644 --- a/src/sp_harden_rand.c +++ b/src/sp_harden_rand.c | |||
| @@ -54,8 +54,7 @@ PHP_FUNCTION(sp_rand) { | |||
| 54 | 54 | ||
| 55 | /* call the original `rand` function, | 55 | /* call the original `rand` function, |
| 56 | * since we might no be the only ones to hook it*/ | 56 | * since we might no be the only ones to hook it*/ |
| 57 | orig_handler = zend_hash_str_find_ptr( | 57 | orig_handler = zend_hash_str_find_ptr(SPG(sp_internal_functions_hook), ZEND_STRL("rand")); |
| 58 | SNUFFLEUPAGUS_G(sp_internal_functions_hook), "rand", sizeof("rand") - 1); | ||
| 59 | orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); | 58 | orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); |
| 60 | 59 | ||
| 61 | random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU); | 60 | random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU); |
| @@ -67,8 +66,7 @@ PHP_FUNCTION(sp_mt_rand) { | |||
| 67 | /* call the original `mt_rand` function, | 66 | /* call the original `mt_rand` function, |
| 68 | * since we might no be the only ones to hook it*/ | 67 | * since we might no be the only ones to hook it*/ |
| 69 | orig_handler = | 68 | orig_handler = |
| 70 | zend_hash_str_find_ptr(SNUFFLEUPAGUS_G(sp_internal_functions_hook), | 69 | zend_hash_str_find_ptr(SPG(sp_internal_functions_hook), ZEND_STRL("mt_rand")); |
| 71 | "mt_rand", sizeof("mt_rand") - 1); | ||
| 72 | orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); | 70 | orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); |
| 73 | 71 | ||
| 74 | random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU); | 72 | random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU); |
