Blame SOURCES/php-5.6.5-CVE-2014-9705.patch

4c9102
From bdfe457a2c1b47209e32783b3a6447e81baf179a Mon Sep 17 00:00:00 2001
4c9102
From: Stanislav Malyshev <stas@php.net>
4c9102
Date: Mon, 16 Feb 2015 06:50:10 +0100
4c9102
Subject: [PATCH] Port for for bug #68552
4c9102
4c9102
---
4c9102
 NEWS                  | 6 ++++++
4c9102
 ext/enchant/enchant.c | 7 +++----
4c9102
 2 files changed, 9 insertions(+), 4 deletions(-)
4c9102
4c9102
diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c
4c9102
index 6de2fea..0eb8144 100644
4c9102
--- a/ext/enchant/enchant.c
4c9102
+++ b/ext/enchant/enchant.c
4c9102
@@ -550,13 +550,12 @@ PHP_FUNCTION(enchant_broker_request_dict)
4c9102
 
4c9102
 	d = enchant_broker_request_dict(pbroker->pbroker, (const char *)tag);
4c9102
 	if (d) {
4c9102
+		pos = pbroker->dictcnt++;
4c9102
 		if (pbroker->dictcnt) {
4c9102
 			pbroker->dict = (enchant_dict **)erealloc(pbroker->dict, sizeof(enchant_dict *) * pbroker->dictcnt);
4c9102
-			pos = pbroker->dictcnt++;
4c9102
 		} else {
4c9102
 			pbroker->dict = (enchant_dict **)emalloc(sizeof(enchant_dict *));
4c9102
 			pos = 0;
4c9102
-			pbroker->dictcnt++;
4c9102
 		}
4c9102
 
4c9102
 		dict = pbroker->dict[pos] = (enchant_dict *)emalloc(sizeof(enchant_dict));
4c9102
@@ -607,14 +606,14 @@ PHP_FUNCTION(enchant_broker_request_pwl_dict)
4c9102
 
4c9102
 	d = enchant_broker_request_pwl_dict(pbroker->pbroker, (const char *)pwl);
4c9102
 	if (d) {
4c9102
+		pos = pbroker->dictcnt++;
4c9102
 		if (pbroker->dictcnt) {
4c9102
-			pos = pbroker->dictcnt++;
4c9102
 			pbroker->dict = (enchant_dict **)erealloc(pbroker->dict, sizeof(enchant_dict *) * pbroker->dictcnt);
4c9102
 		} else {
4c9102
 			pbroker->dict = (enchant_dict **)emalloc(sizeof(enchant_dict *));
4c9102
 			pos = 0;
4c9102
-			pbroker->dictcnt++;
4c9102
 		}
4c9102
+
4c9102
 		dict = pbroker->dict[pos] = (enchant_dict *)emalloc(sizeof(enchant_dict));
4c9102
 		dict->id = pos;
4c9102
 		dict->pbroker = pbroker;
4c9102
-- 
4c9102
2.1.4
4c9102