mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 14:26:07 +00:00
vim-patch:9.0.0046: reading past end of completion with duplicate match
Problem: Reading past end of completion with duplicate match.
Solution: Check string length
baefde1455
This commit is contained in:
@@ -709,7 +709,7 @@ static int ins_compl_add(char_u *const str, int len, char_u *const fname,
|
||||
do {
|
||||
if (!match_at_original_text(match)
|
||||
&& STRNCMP(match->cp_str, str, len) == 0
|
||||
&& match->cp_str[len] == NUL) {
|
||||
&& ((int)STRLEN(match->cp_str) <= len || match->cp_str[len] == NUL)) {
|
||||
FREE_CPTEXT(cptext, cptext_allocated);
|
||||
return NOTDONE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user