aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/ui.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-05-12 19:22:45 +0200
committerGitHub <noreply@github.com>2024-05-12 19:22:45 +0200
commitd8b395b10fd033addef9765e30d9ab42e6cef264 (patch)
tree9688b549e6df4aab240a5bebb595ad01edcfd8ee /src/nvim/api/ui.c
parent4e5c633ed4871a948aff7338b793ac5f93484153 (diff)
parent91a4938edfd3c0382746a8b7b72cb97ab4a6c7ef (diff)
downloadrneovim-d8b395b10fd033addef9765e30d9ab42e6cef264.tar.gz
rneovim-d8b395b10fd033addef9765e30d9ab42e6cef264.tar.bz2
rneovim-d8b395b10fd033addef9765e30d9ab42e6cef264.zip
Merge pull request #28717 from bfredl/rpcmsg
fix(ui): data corruption in remote_ui_raw_line
Diffstat (limited to 'src/nvim/api/ui.c')
-rw-r--r--src/nvim/api/ui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/api/ui.c b/src/nvim/api/ui.c
index 93be51e458..fdf25c75d7 100644
--- a/src/nvim/api/ui.c
+++ b/src/nvim/api/ui.c
@@ -778,7 +778,7 @@ void remote_ui_raw_line(RemoteUI *ui, Integer grid, Integer row, Integer startco
for (size_t i = 0; i < ncells; i++) {
repeat++;
if (i == ncells - 1 || attrs[i] != attrs[i + 1] || chunk[i] != chunk[i + 1]) {
- if (UI_BUF_SIZE - BUF_POS(ui) < 2 * (1 + 2 + sizeof(schar_T) + 5 + 5) + 1
+ if (UI_BUF_SIZE - BUF_POS(ui) < 2 * (1 + 2 + MAX_SCHAR_SIZE + 5 + 5) + 1
|| ui->ncells_pending >= 500) {
// close to overflowing the redraw buffer. finish this event,
// flush, and start a new "grid_line" event at the current position.