aboutsummaryrefslogtreecommitdiff
path: root/jim-format.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2017-05-26 14:22:07 +1000
committerSteve Bennett <steveb@workware.net.au>2017-05-26 14:28:10 +1000
commit8a0aae566304774210aaeaaac929efe3773b3c60 (patch)
tree65e422d388dc504ce14ab3aa5eea5a20dd7148ff /jim-format.c
parent0858783cc469c095d7e6121d1fc5689760da841e (diff)
downloadjimtcl-8a0aae566304774210aaeaaac929efe3773b3c60.zip
jimtcl-8a0aae566304774210aaeaaac929efe3773b3c60.tar.gz
jimtcl-8a0aae566304774210aaeaaac929efe3773b3c60.tar.bz2
format: validate too long precision
Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-format.c')
-rw-r--r--jim-format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/jim-format.c b/jim-format.c
index c3e606a..e9b1d5c 100644
--- a/jim-format.c
+++ b/jim-format.c
@@ -400,7 +400,7 @@ Jim_Obj *Jim_FormatString(Jim_Interp *interp, Jim_Obj *fmtObjPtr, int objc, Jim_
*p = '\0';
/* Put some reasonable limits on the field size */
- if (width > 10000 || length > 10000) {
+ if (width > 10000 || length > 10000 || precision > 10000) {
Jim_SetResultString(interp, "format too long", -1);
goto error;
}