diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-04-27 16:24:07 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-04-27 16:24:07 +0100 |
commit | b7f2270bab102d68f83a6300699b7f98efad81f2 (patch) | |
tree | 937fbee712a1149b6b5fede0f77bf0b51110121a /src/testdir/test_expr.vim | |
parent | fbf2071ac9ef08302a1df86c15f3d4ddbe871243 (diff) |
patch 9.0.1492: using uninitialized memory when argument is missingv9.0.1492
Problem: Using uninitialized memory when argument is missing.
Solution: Check there are sufficient arguments before the base.
(closes #12302)
Diffstat (limited to 'src/testdir/test_expr.vim')
-rw-r--r-- | src/testdir/test_expr.vim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim index 6d6efe72f5..c3543676b0 100644 --- a/src/testdir/test_expr.vim +++ b/src/testdir/test_expr.vim @@ -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() |