mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.4009: reading one byte beyond the end of the line
Problem: Reading one byte beyond the end of the line. Solution: Check for NUL byte first.
This commit is contained in:
@@ -2781,7 +2781,8 @@ compile_def_function(
|
||||
cmd = ea.cmd;
|
||||
if ((*cmd != '$' || starts_with_colon)
|
||||
&& (starts_with_colon || !(*cmd == '\''
|
||||
|| (cmd[0] == cmd[1] && (*cmd == '+' || *cmd == '-')))))
|
||||
|| (cmd[0] != NUL && cmd[0] == cmd[1]
|
||||
&& (*cmd == '+' || *cmd == '-')))))
|
||||
{
|
||||
ea.cmd = skip_range(ea.cmd, TRUE, NULL);
|
||||
if (ea.cmd > cmd)
|
||||
|
Reference in New Issue
Block a user