From 206ffa3fb3fd72c6a2eb45194fb176535a91288c Mon Sep 17 00:00:00 2001 From: xXx-caillou-xXx Date: Thu, 30 Aug 2018 17:14:08 +0200 Subject: Minor code cleanup --- src/sp_harden_rand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sp_harden_rand.c') 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) { /* call the original `rand` function, * since we might no be the only ones to hook it*/ orig_handler = zend_hash_str_find_ptr( - SNUFFLEUPAGUS_G(sp_internal_functions_hook), "rand", strlen("rand")); + SNUFFLEUPAGUS_G(sp_internal_functions_hook), "rand", sizeof("rand") - 1); orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU); @@ -70,7 +70,7 @@ PHP_FUNCTION(sp_mt_rand) { * since we might no be the only ones to hook it*/ orig_handler = zend_hash_str_find_ptr(SNUFFLEUPAGUS_G(sp_internal_functions_hook), - "mt_rand", strlen("mt_rand")); + "mt_rand", sizeof("mt_rand") - 1); orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU); -- cgit v1.3