patch 9.1.0181: no overflow check for string formatting
Problem: no overflow check for string formatting
Solution: Check message formatting function for overflow.
(Chris van Willegen)
closes: #13799
Signed-off-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index ab63b0e..c857fbc 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -1,4 +1,4 @@
-*builtin.txt* For Vim version 9.1. Last change: 2024 Mar 13
+*builtin.txt* For Vim version 9.1. Last change: 2024 Mar 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -7105,6 +7105,9 @@
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: >
echo printf("%s%1$s", "One", "Two")