From b90ef35f1a9a5b3b5ced336d945ca35c235f2494 Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Sat, 22 Nov 2014 16:18:35 +0100 Subject: win32 fix from NewEraCracker --- config.w32 | 6 ++++++ execute.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config.w32 b/config.w32 index 5fa25bc..6f0993f 100644 --- a/config.w32 +++ b/config.w32 @@ -5,4 +5,10 @@ ARG_ENABLE("suhosin", "whether to enable suhosin support", "yes"); if (PHP_SUHOSIN == "yes") { EXTENSION("suhosin", "suhosin.c sha256.c memory_limit.c treat_data.c ifilter.c post_handler.c ufilter.c rfc1867.c rfc1867_new.c log.c header.c execute.c ex_imp.c session.c aes.c crypt.c"); + ARG_ENABLE("suhosin-experimental", "Enable experimental suhosin features", "no"); + + if (PHP_SUHOSIN_EXPERIMENTAL != "no") { + ADD_FLAG("CFLAGS_SUHOSIN", "/D SUHOSIN_EXPERIMENTAL"); + AC_DEFINE("SUHOSIN_EXPERIMENTAL", 1, "Whether to enable experimental suhosin features"); + } } diff --git a/execute.c b/execute.c index ee8447e..d2034f6 100644 --- a/execute.c +++ b/execute.c @@ -1386,7 +1386,7 @@ static void suhosin_gen_entropy(php_uint32 *entropybuf TSRMLS_DC) } #else /* we have to live with the possibility that this call fails */ - php_win32_get_random_bytes(rbuf, 8 * sizeof(php_uint32)); + php_win32_get_random_bytes((unsigned char*)&seedbuf[6], 8 * sizeof(php_uint32)); #endif suhosin_SHA256Init(&context); -- cgit v1.3