forked from enlightenment/efl
evas_textblock: Avoid dereferencing out-of-bounds element
Address sanitizer found this. Not really a serious error as text[i] will be 0 in that case (I believe) and the loop is aborted in any case. Still, better safe than sorry. Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
This commit is contained in:
parent
3e43ad338d
commit
1cb5a8f63a
|
@ -7053,7 +7053,7 @@ evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur)
|
|||
set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks);
|
||||
}
|
||||
|
||||
for (i = cur->pos; (BREAK_AFTER(i)) && (text[i]); i++);
|
||||
for (i = cur->pos; (text[i]) && (BREAK_AFTER(i)); i++);
|
||||
|
||||
for ( ; text[i] ; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue