From 629e604704fb5f81c50c75872f62e66d0056562b Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Sat, 12 Mar 2016 17:23:37 +0100 Subject: [PATCH] termpty_cellrow_get() might return NULL. CID1352819 --- src/bin/termio.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bin/termio.c b/src/bin/termio.c index c36df0dc..6e072246 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -2837,6 +2837,8 @@ _trim_sel_word(Termio *sd) y++) { cells = termpty_cellrow_get(pty, y, &w); + if (!cells) + return; while (start < w && _to_trim(cells[start].codepoint, EINA_TRUE)) start++; @@ -2865,6 +2867,8 @@ _trim_sel_word(Termio *sd) y--) { cells = termpty_cellrow_get(pty, y, &w); + if (!cells) + return; while (end >= 0 && _to_trim(cells[end].codepoint, EINA_FALSE)) end--; @@ -4692,6 +4696,7 @@ _smart_apply(Evas_Object *obj) w = 0; cells = termpty_cellrow_get(sd->pty, y - sd->scroll, &w); + if (!cells) continue; tc = evas_object_textgrid_cellrow_get(sd->grid.obj, y); if (!tc) continue; ch1 = -1;