fix(terminal): stack overflow when too many csi args (#34012)

fix: stack overflow when too many csi args

Problem:
Crash when csi contains > 16 args. It's easy to trigger
when you attempt to pipe external terminal scrollback buffer.
```sh
nvim --clean --cmd "term printf
'\e[38:2:59:66:97;48:2:36:40:59;58:2:224:175:104;4:3m'"
```

Solution:
Increase buffer size.

(cherry picked from commit 756751afa3)
This commit is contained in:
phanium
2025-05-30 19:57:07 +08:00
committed by github-actions[bot]
parent f4a79230c8
commit 68677eb477

View File

@ -15,7 +15,7 @@
#define INTERMED_MAX 16
#define CSI_ARGS_MAX 16
#define CSI_ARGS_MAX 32
#define CSI_LEADER_MAX 16
#define BUFIDX_PRIMARY 0