diff options
author | fvogel <fvogelnew1@free.fr> | 2014-10-29 23:05:22 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2014-10-29 23:05:22 (GMT) |
commit | f3920ba043d2210ee77a82e052b6861a04815dea (patch) | |
tree | 433fa3e460cb7047d9e0ff397038377489942e09 /generic | |
parent | 90f1bb2871f27fb60b636b4b70b9b6e5f9dc3eda (diff) | |
download | tk-f3920ba043d2210ee77a82e052b6861a04815dea.zip tk-f3920ba043d2210ee77a82e052b6861a04815dea.tar.gz tk-f3920ba043d2210ee77a82e052b6861a04815dea.tar.bz2 |
Fixed bug [3417012fff]
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkScale.c | 11 |
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; |