mirror of
https://github.com/vim/vim.git
synced 2025-11-16 23:24:03 -05:00
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
This commit is contained in:
@@ -786,7 +786,8 @@ ins_compl_add(
|
||||
{
|
||||
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))
|
||||
return NOTDONE;
|
||||
match = match->cp_next;
|
||||
} while (match != NULL && !is_first_match(match));
|
||||
|
||||
Reference in New Issue
Block a user