aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2018-12-28 19:04:43 +0100
committerBoris Faure <billiob@gmail.com>2018-12-28 19:04:43 +0100
commit6f1e3ea0778985077b5a363e384a2b837d9c24bd (patch)
treeeb987a63ad3b198eab74a7820d2aa3711d199942 /src
parenttests: avoid using $ in printf (diff)
downloadterminology-6f1e3ea0778985077b5a363e384a2b837d9c24bd.tar.gz
termptyesc: always check return of _csi_truecolor_arg_get()
CID1398478 CID1398479 CID1398480
Diffstat (limited to 'src')
-rw-r--r--src/bin/termptyesc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index c00a3e8..7f9efeb 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -703,7 +703,9 @@ _handle_esc_csi_truecolor_rgb(Termpty *ty, Eina_Unicode **ptr)
/* Skip other parameters */
while ((*ptr) && (**ptr != ';'))
{
- _csi_truecolor_arg_get(ty, ptr);
+ int arg = _csi_truecolor_arg_get(ty, ptr);
+ if (arg == -CSI_ARG_ERROR)
+ break;
}
}
if ((*ptr) && (**ptr == ';'))
@@ -756,7 +758,9 @@ _handle_esc_csi_truecolor_cmy(Termpty *ty, Eina_Unicode **ptr)
/* Skip other parameters */
while ((*ptr) && (**ptr != ';'))
{
- _csi_truecolor_arg_get(ty, ptr);
+ int arg = _csi_truecolor_arg_get(ty, ptr);
+ if (arg == -CSI_ARG_ERROR)
+ break;
}
}
if ((*ptr) && (**ptr == ';'))
@@ -816,7 +820,9 @@ _handle_esc_csi_truecolor_cmyk(Termpty *ty, Eina_Unicode **ptr)
/* Skip other parameters */
while ((*ptr) && (**ptr != ';'))
{
- _csi_truecolor_arg_get(ty, ptr);
+ int arg = _csi_truecolor_arg_get(ty, ptr);
+ if (arg == -CSI_ARG_ERROR)
+ break;
}
}
if ((*ptr) && (**ptr == ';'))