summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogelnew1@free.fr <fvogel>2014-10-29 23:05:22 (GMT)
committerfvogelnew1@free.fr <fvogel>2014-10-29 23:05:22 (GMT)
commitf08efc955443a2b1bdef30a48265dcde63e4caf0 (patch)
treec967205df5fdf61a751b38dc1754ac56fee9d34a /generic
parentae755cd9a14337bc4d325116156df9db80087b0b (diff)
downloadtk-f08efc955443a2b1bdef30a48265dcde63e4caf0.zip
tk-f08efc955443a2b1bdef30a48265dcde63e4caf0.tar.gz
tk-f08efc955443a2b1bdef30a48265dcde63e4caf0.tar.bz2
Fixed bug [3417012fff]
Diffstat (limited to 'generic')
-rw-r--r--generic/tkScale.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/generic/tkScale.c b/generic/tkScale.c
index 28e5b16..258a1fa 100644
--- a/generic/tkScale.c
+++ b/generic/tkScale.c
@@ -632,7 +632,12 @@ ConfigureScale(
scalePtr->tickInterval = -scalePtr->tickInterval;
}
- ComputeFormat(scalePtr);
+ if (scalePtr->digits > TCL_MAX_PREC) {
+ Tcl_AppendResult(interp, "too large -digits value", NULL);
+ continue;
+ } else {
+ ComputeFormat(scalePtr);
+ }
scalePtr->labelLength = scalePtr->label ? (int)strlen(scalePtr->label) : 0;
@@ -888,7 +893,7 @@ static void
ComputeScaleGeometry(
register TkScale *scalePtr) /* Information about widget. */
{
- char valueString[PRINT_CHARS];
+ char valueString[TCL_DOUBLE_SPACE];
int tmp, valuePixels, x, y, extraSpace;
Tk_FontMetrics fm;
@@ -1304,7 +1309,7 @@ ScaleSetVariable(
register TkScale *scalePtr) /* Info about widget. */
{
if (scalePtr->varNamePtr != NULL) {
- char string[PRINT_CHARS];
+ char string[TCL_DOUBLE_SPACE];
sprintf(string, scalePtr->format, scalePtr->value);
scalePtr->flags |= SETTING_VAR;