aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/termptyesc.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2014-09-04 20:44:02 +0200
committerBoris Faure <billiob@gmail.com>2014-09-04 20:45:02 +0200
commitfd1e4ffd4592152e95a9c080a6826188a2a5ff08 (patch)
tree76f459f22247dcb5cb8e5726332d4bbf78e7ee8a /src/bin/termptyesc.c
parentupdate po: modify typo and corresponding to the D1404 (diff)
downloadterminology-fd1e4ffd4592152e95a9c080a6826188a2a5ff08.tar.gz
fix segfault when decoding buggy xterm sequence. cf https://phab.enlightenment.org/T1625
Diffstat (limited to 'src/bin/termptyesc.c')
-rw-r--r--src/bin/termptyesc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index d9bf1ed..2557e0f 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -1050,7 +1050,7 @@ _xterm_arg_get(Eina_Unicode **ptr)
Eina_Unicode *b = *ptr;
int sum = 0;
- while (isdigit(*b))
+ while (*b && isdigit(*b))
{
sum *= 10;
sum += *b - '0';