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:
Daniel Willmann 2013-04-02 18:45:53 +01:00
parent 3e43ad338d
commit 1cb5a8f63a
1 changed files with 1 additions and 1 deletions

View File

@ -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++)
{