Skip to content

Commit

Permalink
Fixed bug #62838
Browse files Browse the repository at this point in the history
enchant_dict_quick_check() destroys zval, but fails to initialize it
  • Loading branch information
tony2001 committed Aug 16, 2012
1 parent 3e0b33e commit 8649e42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions NEWS
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions ext/enchant/enchant.c
Expand Up @@ -729,6 +729,7 @@ PHP_FUNCTION(enchant_dict_quick_check)

if (sugg) {
zval_dtor(sugg);
array_init(sugg);
}

PHP_ENCHANT_GET_DICT;
Expand All @@ -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) {
Expand Down

0 comments on commit 8649e42

Please sign in to comment.