aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2016-03-12 17:23:37 +0100
committerBoris Faure <billiob@gmail.com>2016-03-12 17:23:37 +0100
commit629e604704fb5f81c50c75872f62e66d0056562b (patch)
treea3ba3f27f2bf27182129b35538230d106584da04
parentensure CWD is NULL-terminated. CID1352820 (diff)
downloadterminology-629e604704fb5f81c50c75872f62e66d0056562b.tar.gz
termpty_cellrow_get() might return NULL. CID1352819
-rw-r--r--src/bin/termio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bin/termio.c b/src/bin/termio.c
index c36df0d..6e07224 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;