summaryrefslogtreecommitdiff
path: root/src/sp_harden_rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp_harden_rand.c')
-rw-r--r--src/sp_harden_rand.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/sp_harden_rand.c b/src/sp_harden_rand.c
index 3727bef..cb57591 100644
--- a/src/sp_harden_rand.c
+++ b/src/sp_harden_rand.c
@@ -56,9 +56,8 @@ PHP_FUNCTION(sp_rand) {
56 56
57 /* call the original `rand` function, 57 /* call the original `rand` function,
58 * since we might no be the only ones to hook it*/ 58 * since we might no be the only ones to hook it*/
59 orig_handler = 59 orig_handler = zend_hash_str_find_ptr(
60 zend_hash_str_find_ptr(SNUFFLEUPAGUS_G(sp_internal_functions_hook), 60 SNUFFLEUPAGUS_G(sp_internal_functions_hook), "rand", strlen("rand"));
61 "rand", strlen("rand"));
62 orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); 61 orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU);
63 62
64 random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU); 63 random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU);
@@ -70,8 +69,8 @@ PHP_FUNCTION(sp_mt_rand) {
70 /* call the original `mt_rand` function, 69 /* call the original `mt_rand` function,
71 * since we might no be the only ones to hook it*/ 70 * since we might no be the only ones to hook it*/
72 orig_handler = 71 orig_handler =
73 zend_hash_str_find_ptr(SNUFFLEUPAGUS_G(sp_internal_functions_hook), 72 zend_hash_str_find_ptr(SNUFFLEUPAGUS_G(sp_internal_functions_hook),
74 "mt_rand", strlen("mt_rand")); 73 "mt_rand", strlen("mt_rand"));
75 orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); 74 orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU);
76 75
77 random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU); 76 random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU);