diff options
author | dequis <dx@dxzone.com.ar> | 2016-01-29 10:40:18 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2016-01-29 10:40:18 -0300 |
commit | 7674fd5936de3190f1fd3bba3ef82370a2941064 (patch) | |
tree | 9fa9510fcec478eb38cd7389134eba30ea3c6fb5 | |
parent | 161772892f5525f5565a2e00fe1181adbc5c3976 (diff) | |
download | irssi-7674fd5936de3190f1fd3bba3ef82370a2941064.zip |
completion: Fix crash when the complist provided by a script has nulls
Can be reproduced with aspell_complete.pl 1.00 by setting an invalid
dictionary with "/set spell_dict a"
-rw-r--r-- | src/fe-common/core/completion.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c index a4715d23..1e7833a4 100644 --- a/src/fe-common/core/completion.c +++ b/src/fe-common/core/completion.c @@ -217,6 +217,11 @@ char *word_complete(WINDOW_REC *window, const char *line, int *pos, int erase, i want_space = TRUE; signal_emit("complete word", 5, &complist, window, word, linestart, &want_space); last_want_space = want_space; + + if (complist != NULL) { + /* Remove all nulls (from the signal) before doing further processing */ + complist = g_list_remove_all(g_list_first(complist), NULL); + } } g_free(linestart); |