summaryrefslogtreecommitdiffstats
path: root/redis-igbinary.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-10-04 09:40:56 +0200
committerRemi Collet <fedora@famillecollet.com>2014-10-04 09:40:56 +0200
commitc0e9660da5644ab6503a9ec91c10c429359452e4 (patch)
tree978fb5f3fa158d70d744bb7c8b6799fed9ddd051 /redis-igbinary.patch
parentba3bbf686aabe4355459af25e01684cd0579526b (diff)
php-pecl-redis: test build
Diffstat (limited to 'redis-igbinary.patch')
-rw-r--r--redis-igbinary.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/redis-igbinary.patch b/redis-igbinary.patch
new file mode 100644
index 0000000..6af7538
--- /dev/null
+++ b/redis-igbinary.patch
@@ -0,0 +1,27 @@
+From aecfbfd650d6b504193d48f82a4a170ce3ce4cd6 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Fri, 3 Oct 2014 19:19:33 +0200
+Subject: [PATCH] Fix segfault with igbinary, fix #341
+
+---
+ library.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/library.c b/library.c
+index 40d43fa..3e91e93 100644
+--- a/library.c
++++ b/library.c
+@@ -1646,11 +1646,12 @@ redis_unserialize(RedisSock *redis_sock, const char *val, int val_len, zval **re
+ #ifdef HAVE_REDIS_IGBINARY
+ if(!*return_value) {
+ MAKE_STD_ZVAL(*return_value);
++ rv_free = 1;
+ }
+ if(igbinary_unserialize((const uint8_t *)val, (size_t)val_len, return_value TSRMLS_CC) == 0) {
+ return 1;
+ }
+- efree(*return_value);
++ if(rv_free==1) efree(*return_value);
+ #endif
+ return 0;
+ break;