aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2021-02-18 16:01:18 +0000
committerThomas Adam <thomas@xteddy.org>2021-02-18 16:01:18 +0000
commit11e404ca3c80893f59b1001f000c9390216c7e7a (patch)
treeddf530817297c6a9921a69f5f64db10d0b7615cc
parent3a76a5682481804541aaddcce27dfa566a7e4cae (diff)
parentfb42ae3071763fdc6a2fe2e57feec774623b1c33 (diff)
downloadrtmux-11e404ca3c80893f59b1001f000c9390216c7e7a.tar.gz
rtmux-11e404ca3c80893f59b1001f000c9390216c7e7a.tar.bz2
rtmux-11e404ca3c80893f59b1001f000c9390216c7e7a.zip
Merge branch 'obsd-master' into master
-rw-r--r--input.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/input.c b/input.c
index 590a157d..f6aeb027 100644
--- a/input.c
+++ b/input.c
@@ -2460,8 +2460,10 @@ input_osc_parse_colour(const char *p)
(1 - m) * (1 - k) * 255,
(1 - y) * (1 - k) * 255);
} else {
- while (*p == ' ')
+ while (len != 0 && *p == ' ') {
p++;
+ len--;
+ }
while (len != 0 && p[len - 1] == ' ')
len--;
copy = xstrndup(p, len);