From 450a68b7cc9f1bb65bbb9a38d49b49cfd7c0e5b0 Mon Sep 17 00:00:00 2001 From: Abdelhakeem Osama Date: Wed, 21 Aug 2019 21:17:09 +0300 Subject: vim-patch:8.1.0888: the a: dict is not immutable as documented (#10819) Problem: The a: dict is not immutable as documented. Solution: Make the a:dict immutable, add a test. (Ozaki Kiichi, Yasuhiro Matsumoto, closes vim/vim#3929) https://github.com/vim/vim/commit/31b816042fca879b11965ddd75287732563ba698 --- src/nvim/edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/edit.c') diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 7e0a6c3329..217b7ce1be 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -4183,7 +4183,7 @@ static int ins_compl_get_exp(pos_T *ini) if (tmp_ptr - ptr >= IOSIZE - len) { tmp_ptr = ptr + IOSIZE - len - 1; } - STRNCPY(IObuff + len, ptr, tmp_ptr - ptr); + STRLCPY(IObuff + len, ptr, IOSIZE - len); len += (int)(tmp_ptr - ptr); flags |= CONT_S_IPOS; } -- cgit