termiolink: handle OOM. Fix CID1365658

This commit is contained in:
Boris Faure 2016-11-08 21:13:21 +01:00
parent f4263d5098
commit 57c811ce9b
1 changed files with 4 additions and 2 deletions

View File

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