everything - fix string index mishandle that causes segv's

also ensure we nuke time rhandles too - spotted that. this is a real
issue asan found and yomi first pointed at. reproduced, found, fixed.

@fix
This commit is contained in:
Carsten Haitzler 2019-08-08 09:24:10 +01:00
parent fd26c7b224
commit 7ab9466f77
2 changed files with 13 additions and 2 deletions

View File

@ -1891,6 +1891,11 @@ _evry_input_complete(Evry_State *s)
{
strncpy(s->input, input, INPUTLEN - 1);
_evry_update_text_label(s);
if (CUR_SEL->update_timer)
{
ecore_timer_del(CUR_SEL->update_timer);
CUR_SEL->update_timer = NULL;
}
_evry_cb_update_timer(CUR_SEL);
evry_item_select(s, it);
}

View File

@ -191,7 +191,10 @@ evry_fuzzy_match(const char *str, const char *match)
ii = 0;
/* go to next match */
for (; (m[0] && m[ii]) && !isspace(*m); m += ii)
if (!_evry_utf8_next(m, &ii)) break;
{
ii = 0;
if (!_evry_utf8_next(m, &ii)) break;
}
}
if (m_cnt < m_num - 1)
@ -199,7 +202,10 @@ evry_fuzzy_match(const char *str, const char *match)
ii = 0;
/* test next match */
for (; (m[0] && m[ii]) && !isspace(*m); m += ii)
if (!_evry_utf8_next(m, &ii)) break;
{
ii = 0;
if (!_evry_utf8_next(m, &ii)) break;
}
m_cnt++;
break;
}