mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 23:31:51 +00:00
vim-patch:9.1.0313: Crash when using heredoc with comment in command block
Problem: Crash when using heredoc with comment in command block.
Solution: Handle a newline more like the end of the line, fix coverity
warning (zeertzjq).
closes: vim/vim#14535
1f5175d9af
This commit is contained in:
@@ -1045,20 +1045,6 @@ char *skiptowhite(const char *p)
|
||||
return (char *)p;
|
||||
}
|
||||
|
||||
/// Skip over text until ' ' or '\t' or newline or NUL
|
||||
///
|
||||
/// @param[in] p Text to skip over.
|
||||
///
|
||||
/// @return Pointer to the next whitespace or newline or NUL character.
|
||||
char *skiptowhite_or_nl(const char *p)
|
||||
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_PURE
|
||||
{
|
||||
while (*p != ' ' && *p != '\t' && *p != NL && *p != NUL) {
|
||||
p++;
|
||||
}
|
||||
return (char *)p;
|
||||
}
|
||||
|
||||
/// skiptowhite_esc: Like skiptowhite(), but also skip escaped chars
|
||||
///
|
||||
/// @param p
|
||||
|
Reference in New Issue
Block a user