1
0
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:
Bram Moolenaar
2021-11-25 10:50:12 +00:00
parent bb277fd89f
commit bd228fd097
3 changed files with 12 additions and 2 deletions

View File

@@ -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