diff options
| author | Thibault "bui" Koechlin | 2017-10-18 13:17:46 +0200 |
|---|---|---|
| committer | jvoisin | 2017-10-18 13:17:46 +0200 |
| commit | 8f94a1179e9cf9d96f18ec6c851dddbecd54ea6f (patch) | |
| tree | 970a0cd9f700935e4bd16e73dc630dd3e36554ab /src/sp_harden_rand.c | |
| parent | da49f804ad5ae283c10ad757cd39bcc212b66f88 (diff) | |
.drop() is not a `nop` anymore
`.drop()` is now baillout out, instead of nop'ing the call.
This closes #13
Diffstat (limited to 'src/sp_harden_rand.c')
| -rw-r--r-- | src/sp_harden_rand.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sp_harden_rand.c b/src/sp_harden_rand.c index 130f748..2155e7e 100644 --- a/src/sp_harden_rand.c +++ b/src/sp_harden_rand.c | |||
| @@ -51,8 +51,9 @@ PHP_FUNCTION(sp_rand) { | |||
| 51 | /* call the original `rand` function, | 51 | /* call the original `rand` function, |
| 52 | * since we might no be the only ones to hook it*/ | 52 | * since we might no be the only ones to hook it*/ |
| 53 | orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); | 53 | orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); |
| 54 | } else { | ||
| 55 | sp_log_err("harden_rand", "Unable to find the pointer to the original function 'rand' in the hashtable.\n"); | ||
| 54 | } | 56 | } |
| 55 | |||
| 56 | random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU); | 57 | random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU); |
| 57 | } | 58 | } |
| 58 | 59 | ||
| @@ -64,8 +65,9 @@ PHP_FUNCTION(sp_mt_rand) { | |||
| 64 | /* call the original `mt_rand` function, | 65 | /* call the original `mt_rand` function, |
| 65 | * since we might no be the only ones to hook it*/ | 66 | * since we might no be the only ones to hook it*/ |
| 66 | orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); | 67 | orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); |
| 68 | } else { | ||
| 69 | sp_log_err("harden_rand", "Unable to find the pointer to the original function 'mt_rand' in the hashtable.\n"); | ||
| 67 | } | 70 | } |
| 68 | |||
| 69 | random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU); | 71 | random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU); |
| 70 | } | 72 | } |
| 71 | 73 | ||
