[PATCH 2/2] Limit number of repetitions in CSI_REP

19 views
Skip to first unread message

Sergey Nizovtsev

unread,
Oct 30, 2020, 7:01:42 AM10/30/20
to tmux-...@googlegroups.com, Sergey Nizovtsev
Large values may hang tmux for a while, so limit number of CSI_REP
iterations the same way as in libvte (vteseq.cc#L6873).

diff --git input.c input.c
index c280c0d9..d43fc4c2 100644
--- input.c
+++ input.c
@@ -1542,8 +1542,11 @@ input_csi_dispatch(struct input_ctx *ictx)
break;
case INPUT_CSI_REP:
n = input_get(ictx, 0, 1, 1);
+ m = screen_size_x(s) - s->cx;
if (n == -1)
break;
+ if (n > m)
+ n = m;

if (ictx->last == -1)
break;
--
2.28.0

Nicholas Marriott

unread,
Oct 30, 2020, 7:34:38 AM10/30/20
to Sergey Nizovtsev, tmux-...@googlegroups.com

Great, both applied, thanks!
> --
> You received this message because you are subscribed to the Google Groups "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/CAHOaf96D8DcoJVMpXFZ2X%2BEXjQdkt%3DL%3Dm943z2PBUJj79GfyRQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages