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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sp_harden_rand.c b/src/sp_harden_rand.c
index ca0503b..7b4e958 100644
--- a/src/sp_harden_rand.c
+++ b/src/sp_harden_rand.c
@@ -57,7 +57,7 @@ PHP_FUNCTION(sp_rand) {
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 = zend_hash_str_find_ptr( 59 orig_handler = zend_hash_str_find_ptr(
60 SNUFFLEUPAGUS_G(sp_internal_functions_hook), "rand", strlen("rand")); 60 SNUFFLEUPAGUS_G(sp_internal_functions_hook), "rand", sizeof("rand") - 1);
61 orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); 61 orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU);
62 62
63 random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU); 63 random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU);
@@ -70,7 +70,7 @@ PHP_FUNCTION(sp_mt_rand) {
70 * since we might no be the only ones to hook it*/ 70 * since we might no be the only ones to hook it*/
71 orig_handler = 71 orig_handler =
72 zend_hash_str_find_ptr(SNUFFLEUPAGUS_G(sp_internal_functions_hook), 72 zend_hash_str_find_ptr(SNUFFLEUPAGUS_G(sp_internal_functions_hook),
73 "mt_rand", strlen("mt_rand")); 73 "mt_rand", sizeof("mt_rand") - 1);
74 orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); 74 orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU);
75 75
76 random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU); 76 random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU);