forked from aniani/vim
patch 9.0.1492: using uninitialized memory when argument is missing
Problem: Using uninitialized memory when argument is missing.
Solution: Check there are sufficient arguments before the base.
(closes #12302)
This commit is contained in:
@@ -458,6 +458,9 @@ func Test_printf_misc()
|
||||
call v9.CheckLegacyAndVim9Success(lines)
|
||||
|
||||
call v9.CheckLegacyAndVim9Failure(["call printf('123', 3)"], "E767:")
|
||||
|
||||
" this was using uninitialized memory
|
||||
call v9.CheckLegacyAndVim9Failure(["eval ''->printf()"], "E119:")
|
||||
endfunc
|
||||
|
||||
func Test_printf_float()
|
||||
|
||||
Reference in New Issue
Block a user