Skip to content

Commit 8649e42

Browse files
committed
Fixed bug #62838
enchant_dict_quick_check() destroys zval, but fails to initialize it
1 parent 3e0b33e commit 8649e42

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ PHP NEWS
3333
. Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance
3434
gives Segmentation fault). (Laruence, Gustavo)
3535

36+
- Enchant:
37+
. Fixed bug #62838 (enchant_dict_quick_check() destroys zval, but fails to
38+
initialize it). (Tony, Mateusz Goik).
39+
3640
19 Jul 2012, PHP 5.3.15
3741

3842
- Zend Engine:

ext/enchant/enchant.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,7 @@ PHP_FUNCTION(enchant_dict_quick_check)
729729

730730
if (sugg) {
731731
zval_dtor(sugg);
732+
array_init(sugg);
732733
}
733734

734735
PHP_ENCHANT_GET_DICT;
@@ -742,8 +743,6 @@ PHP_FUNCTION(enchant_dict_quick_check)
742743
RETURN_FALSE;
743744
}
744745

745-
array_init(sugg);
746-
747746
suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, &n_sugg_st);
748747
memcpy(&n_sugg, &n_sugg_st, sizeof(n_sugg));
749748
if (suggs && n_sugg) {

0 commit comments

Comments
 (0)