diff options
| author | xXx-caillou-xXx | 2018-08-30 17:14:08 +0200 |
|---|---|---|
| committer | jvoisin | 2018-08-30 15:14:08 +0000 |
| commit | 206ffa3fb3fd72c6a2eb45194fb176535a91288c (patch) | |
| tree | 23a25d83c4ca878861f413a0d5df2ad77c7dadaf /src/sp_harden_rand.c | |
| parent | b3f67a16094168cc334f5da93a86f09476e01601 (diff) | |
Minor code cleanup
Diffstat (limited to 'src/sp_harden_rand.c')
| -rw-r--r-- | src/sp_harden_rand.c | 4 |
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); |
