mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
Merge pull request #14199 from bfredl/chansend2
api: fix use-after-free in nvim_chan_send
This commit is contained in:
@@ -916,7 +916,7 @@ static void f_chansend(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
}
|
||||
uint64_t id = argvars[0].vval.v_number;
|
||||
const char *error = NULL;
|
||||
rettv->vval.v_number = channel_send(id, input, input_len, &error);
|
||||
rettv->vval.v_number = channel_send(id, input, input_len, true, &error);
|
||||
if (error) {
|
||||
EMSG(error);
|
||||
}
|
||||
|
Reference in New Issue
Block a user