mirror of
https://github.com/neovim/neovim.git
synced 2026-08-27 17:41:48 +00:00
vim-patch:9.2.0458: Crash with invalid shellredir/shellpipe value (#39691)
Problem: Crash with invalid shellredir/shellpipe value
(bfredl)
Solution: Validate the option and allow only a single "%s".
fixes: vim/vim#20157
closes: vim/vim#20159
84ae09dd79
Co-authored-by: Christian Brabandt <cb@256bit.org>
(cherry picked from commit ffe87d91f7)
This commit is contained in:
committed by
github-actions[bot]
parent
79fd0b6655
commit
2902ec0541
@@ -7680,6 +7680,7 @@ local options = {
|
||||
},
|
||||
{
|
||||
abbreviation = 'sp',
|
||||
cb = 'did_set_shellpipe_redir',
|
||||
defaults = {
|
||||
condition = 'MSWIN',
|
||||
if_false = '| tee',
|
||||
@@ -7716,6 +7717,7 @@ local options = {
|
||||
Note: When using a pipe like "| tee", you'll lose the exit code of the
|
||||
shell command. This might be configurable by your shell, look for
|
||||
the pipefail option (for bash and zsh, use ":set -o pipefail").
|
||||
Only a single "%s" value is allowed.
|
||||
]=],
|
||||
full_name = 'shellpipe',
|
||||
scope = { 'global' },
|
||||
@@ -7751,6 +7753,7 @@ local options = {
|
||||
},
|
||||
{
|
||||
abbreviation = 'srr',
|
||||
cb = 'did_set_shellpipe_redir',
|
||||
defaults = {
|
||||
condition = 'MSWIN',
|
||||
if_false = '>',
|
||||
@@ -7777,6 +7780,8 @@ local options = {
|
||||
explicitly set before.
|
||||
In the future pipes may be used for filtering and this option will
|
||||
become obsolete (at least for Unix).
|
||||
*E1577*
|
||||
Only a single "%s" item is allowed in the option value.
|
||||
]=],
|
||||
full_name = 'shellredir',
|
||||
scope = { 'global' },
|
||||
|
||||
Reference in New Issue
Block a user