aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2016-11-08 21:13:21 +0100
committerBoris Faure <billiob@gmail.com>2016-11-08 21:13:21 +0100
commit57c811ce9b3eb7f63f45d4fc7eaf5cbe85fed826 (patch)
treebcf50ccf88db2486ea0602c2328ef16c57dc0dee
parenttermptyesc: add missing break (CID1365404) (diff)
downloadterminology-57c811ce9b3eb7f63f45d4fc7eaf5cbe85fed826.tar.gz
termiolink: handle OOM. Fix CID1365658
-rw-r--r--src/bin/termiolink.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/termiolink.c b/src/bin/termiolink.c
index 3f31789..afbd7c9 100644
--- a/src/bin/termiolink.c
+++ b/src/bin/termiolink.c
@@ -226,7 +226,8 @@ termio_link_find(Evas_Object *obj, int cx, int cy,
res = _txt_at(ty, &x1, &y1, txt, &txtlen);
if ((res != 0) || (txtlen == 0)) goto end;
- ty_sb_add(&sb, txt, txtlen);
+ res = ty_sb_add(&sb, txt, txtlen);
+ if (res < 0) goto end;
while (goback)
{
@@ -327,7 +328,8 @@ termio_link_find(Evas_Object *obj, int cx, int cy,
break;
}
- ty_sb_add(&sb, txt, txtlen);
+ res = ty_sb_add(&sb, txt, txtlen);
+ if (res < 0) goto end;
if (!link_is_protocol(sb.buf))
{