From 3966bdb919a34a341b88385209cdac9c7eac9991 Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Thu, 3 Mar 2016 16:51:02 +0100 Subject: random + seed protection --- execute.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'execute.c') diff --git a/execute.c b/execute.c index ea9b21a..65dec2e 100644 --- a/execute.c +++ b/execute.c @@ -23,7 +23,6 @@ #include "config.h" #endif -// #include #include "php.h" // #include "php_ini.h" // #include "zend_hash.h" @@ -37,7 +36,6 @@ #include "SAPI.h" #include "execute.h" -// #include "sha256.h" // #ifdef PHP_WIN32 // # include "win32/fnmatch.h" @@ -555,6 +553,13 @@ static suhosin_internal_function_handler ihandlers[] = { // { "mail", ih_mail, NULL, NULL, NULL }, // { "symlink", ih_symlink, NULL, NULL, NULL }, + // random number functions + S7_IH_ENTRY0i(srand) + S7_IH_ENTRY0i(mt_srand) + S7_IH_ENTRY0i(rand) + S7_IH_ENTRY0i(mt_rand) + S7_IH_ENTRY0i(getrandmax) + S7_IH_ENTRY0("mt_getrandmax", getrandmax) // { "srand", ih_srand, NULL, NULL, NULL }, // { "mt_srand", ih_mt_srand, NULL, NULL, NULL }, // { "rand", ih_rand, NULL, NULL, NULL }, -- cgit v1.3