diff options
Diffstat (limited to 'redis-pr1064.patch')
-rw-r--r-- | redis-pr1064.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/redis-pr1064.patch b/redis-pr1064.patch new file mode 100644 index 0000000..3e43523 --- /dev/null +++ b/redis-pr1064.patch @@ -0,0 +1,31 @@ +From 4706aae6eacc62e45cd4280dc5bd80668d22641c Mon Sep 17 00:00:00 2001 +From: Remi Collet <fedora@famillecollet.com> +Date: Fri, 16 Dec 2016 15:31:11 +0100 +Subject: [PATCH] Fix #1060 don't return pointer to local volatile data + +--- + library.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/library.h b/library.h +index 8eb6708..6aef144 100644 +--- a/library.h ++++ b/library.h +@@ -88,7 +88,7 @@ PHP_REDIS_API void redis_client_list_reply(INTERNAL_FUNCTION_PARAMETERS, RedisSo + #if ZEND_MODULE_API_NO >= 20100000 + #define REDIS_DOUBLE_TO_STRING(dbl_str, dbl) do { \ + char dbl_decsep = '.'; \ +- zend_string _zstr = {0}; \ ++ static zend_string _zstr = {0}; \ + _zstr.val = _php_math_number_format_ex(dbl, 16, &dbl_decsep, 1, NULL, 0); \ + _zstr.len = strlen(_zstr.val); \ + _zstr.gc = 0x10; \ +@@ -96,7 +96,7 @@ PHP_REDIS_API void redis_client_list_reply(INTERNAL_FUNCTION_PARAMETERS, RedisSo + } while (0); + #else + #define REDIS_DOUBLE_TO_STRING(dbl_str, dbl) do { \ +- zend_string _zstr = {0}; \ ++ static zend_string _zstr = {0}; \ + _zstr.val = _php_math_number_format(dbl, 16, '.', '\x00'); \ + _zstr.len = strlen(_zstr.val); \ + _zstr.gc = 0x10; \ |