aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_meta/vimfn.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-03-15 08:05:59 +0800
committerGitHub <noreply@github.com>2024-03-15 08:05:59 +0800
commitd326e04860427b0a6a0b66da86fae8e5d23c8a7c (patch)
treec8476fc08abc5824a614e75ba0a874147ee918f2 /runtime/lua/vim/_meta/vimfn.lua
parent60491466f951f93d8d9010645e1dac367f3ea979 (diff)
downloadrneovim-d326e04860427b0a6a0b66da86fae8e5d23c8a7c.tar.gz
rneovim-d326e04860427b0a6a0b66da86fae8e5d23c8a7c.tar.bz2
rneovim-d326e04860427b0a6a0b66da86fae8e5d23c8a7c.zip
vim-patch:9.1.0181: no overflow check for string formatting (#27863)
Problem: no overflow check for string formatting Solution: Check message formatting function for overflow. (Chris van Willegen) closes: vim/vim#13799 https://github.com/vim/vim/commit/c35fc03dbd47582b256776fb11f11d8ceb24f8f0 Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
Diffstat (limited to 'runtime/lua/vim/_meta/vimfn.lua')
-rw-r--r--runtime/lua/vim/_meta/vimfn.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua
index fb5e2a727e..da251f89ad 100644
--- a/runtime/lua/vim/_meta/vimfn.lua
+++ b/runtime/lua/vim/_meta/vimfn.lua
@@ -6520,6 +6520,9 @@ function vim.fn.prevnonblank(lnum) end
--- echo printf("%1$*2$.*3$f", 1.4142135, 6, 2)
--- < 1.41
---
+--- You will get an overflow error |E1510|, when the field-width
+--- or precision will result in a string longer than 6400 chars.
+---
--- *E1500*
--- You cannot mix positional and non-positional arguments: >vim
--- echo printf("%s%1$s", "One", "Two")