[evolution/wip/webkit-composer: 257/372] Avoid crash in e_spell_dictionary_get_suggestions().



commit ab2e784aa77c04bed5532d0babae0dc712d68566
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon May 6 10:55:01 2013 -0400

    Avoid crash in e_spell_dictionary_get_suggestions().
    
    Bug 699757 showed that enchant_dict_suggest() does not always set its
    "number of words" output parameter, so initialize our 'count' variable
    prior to calling enchant_dict_suggest().

 e-util/e-spell-dictionary.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-spell-dictionary.c b/e-util/e-spell-dictionary.c
index 2ecc675..e6e06b7 100644
--- a/e-util/e-spell-dictionary.c
+++ b/e-util/e-spell-dictionary.c
@@ -732,7 +732,7 @@ e_spell_dictionary_get_suggestions (ESpellDictionary *dictionary,
        EnchantDict *enchant_dict;
        GList *list = NULL;
        gchar **suggestions;
-       gsize ii, count;
+       gsize ii, count = 0;
 
        g_return_val_if_fail (E_IS_SPELL_DICTIONARY (dictionary), NULL);
        g_return_val_if_fail (word != NULL && *word != '\0', NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]