From dc842b031204122e2b2613b88615f12719d953aa Mon Sep 17 00:00:00 2001 From: Anshul Maheshwari Date: Fri, 19 Jun 2015 22:59:22 +0530 Subject: [PATCH] removed segfault with cap file --- src/lib_ccx/ccx_encoders_helpers.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib_ccx/ccx_encoders_helpers.c b/src/lib_ccx/ccx_encoders_helpers.c index 722a4e30..ef25be7e 100644 --- a/src/lib_ccx/ccx_encoders_helpers.c +++ b/src/lib_ccx/ccx_encoders_helpers.c @@ -293,6 +293,11 @@ int add_word(const char *word) ptr_correct = (char **)realloc(spell_correct, sizeof (char *)* spell_capacity); } + else + { + ptr_lower = spell_lower; + ptr_correct = spell_correct; + } size_t len = strlen(word); new_lower = (char *)malloc(len + 1); new_correct = (char *)malloc(len + 1);