From da60d1f06ba1b22894b570b121f94d34da6d571f Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 27 Nov 2017 13:15:15 +0100 Subject: Initialize some possibly uninitialized variables Thanks to coverity --- src/sp_harden_rand.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/sp_harden_rand.c b/src/sp_harden_rand.c index 812686e..4b6fa18 100644 --- a/src/sp_harden_rand.c +++ b/src/sp_harden_rand.c @@ -7,7 +7,9 @@ ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) /* This function is needed because `rand` and `mt_rand` parameters * are optional, while the ones from `random_int` aren't. */ static void random_int_wrapper(INTERNAL_FUNCTION_PARAMETERS) { - zend_long min, max, result; + zend_long min = 0; + zend_long max = PHP_MT_RAND_MAX; + zend_long result; switch (EX_NUM_ARGS()) { case 0: -- cgit v1.3