forked from aniani/vim
patch 8.2.3669: buffer overflow with long help argument
Problem: Buffer overflow with long help argument. Solution: Use snprintf().
This commit is contained in:
@@ -134,4 +134,13 @@ func Test_help_window_height()
|
||||
close
|
||||
endfunc
|
||||
|
||||
func Test_help_long_argument()
|
||||
try
|
||||
exe 'help \%' .. repeat('0', 1021)
|
||||
catch
|
||||
call assert_match("E149:", v:exception)
|
||||
endtry
|
||||
endfunc
|
||||
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
Reference in New Issue
Block a user