summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2012-08-16 14:32:55 +0400
committerAntony Dovgal <tony2001@php.net>2012-08-16 14:32:55 +0400
commit8649e4236b12ce9b90356a5804be96bd1f67bcd6 (patch)
tree674108298b6df80d7f3f94fa7871caf04f6bdc58
parent3e0b33ed62f329b92eab30e3a97d5bc578e5f855 (diff)
downloadphp-git-8649e4236b12ce9b90356a5804be96bd1f67bcd6.tar.gz
Fixed bug #62838
enchant_dict_quick_check() destroys zval, but fails to initialize it
-rw-r--r--NEWS4
-rwxr-xr-xext/enchant/enchant.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index c7afe53d94..8da7256017 100644
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,10 @@ PHP NEWS
. Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance
gives Segmentation fault). (Laruence, Gustavo)
+- Enchant:
+ . Fixed bug #62838 (enchant_dict_quick_check() destroys zval, but fails to
+ initialize it). (Tony, Mateusz Goik).
+
19 Jul 2012, PHP 5.3.15
- Zend Engine:
diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c
index 0126d9ef4e..dcc39e267b 100755
--- a/ext/enchant/enchant.c
+++ b/ext/enchant/enchant.c
@@ -729,6 +729,7 @@ PHP_FUNCTION(enchant_dict_quick_check)
if (sugg) {
zval_dtor(sugg);
+ array_init(sugg);
}
PHP_ENCHANT_GET_DICT;
@@ -742,8 +743,6 @@ PHP_FUNCTION(enchant_dict_quick_check)
RETURN_FALSE;
}
- array_init(sugg);
-
suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, &n_sugg_st);
memcpy(&n_sugg, &n_sugg_st, sizeof(n_sugg));
if (suggs && n_sugg) {