From 8f94a1179e9cf9d96f18ec6c851dddbecd54ea6f Mon Sep 17 00:00:00 2001 From: Thibault "bui" Koechlin Date: Wed, 18 Oct 2017 13:17:46 +0200 Subject: .drop() is not a `nop` anymore `.drop()` is now baillout out, instead of nop'ing the call. This closes #13--- src/sp_harden_rand.c | 6 ++++-- 1 file changed, 4 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 130f748..2155e7e 100644 --- a/src/sp_harden_rand.c +++ b/src/sp_harden_rand.c @@ -51,8 +51,9 @@ PHP_FUNCTION(sp_rand) { /* call the original `rand` function, * since we might no be the only ones to hook it*/ orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); + } else { + sp_log_err("harden_rand", "Unable to find the pointer to the original function 'rand' in the hashtable.\n"); } - random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU); } @@ -64,8 +65,9 @@ PHP_FUNCTION(sp_mt_rand) { /* call the original `mt_rand` function, * since we might no be the only ones to hook it*/ orig_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU); + } else { + sp_log_err("harden_rand", "Unable to find the pointer to the original function 'mt_rand' in the hashtable.\n"); } - random_int_wrapper(INTERNAL_FUNCTION_PARAM_PASSTHRU); } -- cgit v1.3