summaryrefslogtreecommitdiffstats
path: root/generic/tclStrToD.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-09-01 17:29:32 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-09-01 17:29:32 (GMT)
commit4a4571c9fe2d509639a55f8a366fd631e67a6800 (patch)
tree8a14a70bb10f79c8b764eac9b06de1e7af757fc7 /generic/tclStrToD.c
parentb8db328a5dc663435c02e2b2a67f3d66e16602c9 (diff)
parentc639e72c38ffbe038a79a58991d4c5bb3e027a6f (diff)
downloadtcl-4a4571c9fe2d509639a55f8a366fd631e67a6800.zip
tcl-4a4571c9fe2d509639a55f8a366fd631e67a6800.tar.gz
tcl-4a4571c9fe2d509639a55f8a366fd631e67a6800.tar.bz2
3402540 Corrections to TclParseNumber() to make it reject invalid Nan(Hex).
[scan Inf %g] is portable; remove constraint.
Diffstat (limited to 'generic/tclStrToD.c')
-rwxr-xr-xgeneric/tclStrToD.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index a55ee83..f666e08 100755
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -1101,7 +1101,10 @@ TclParseNumber(
d = 10 + c - 'a';
} else if (c >= 'A' && c <= 'F') {
d = 10 + c - 'A';
+ } else {
+ goto endgame;
}
+ numSigDigs++;
significandWide = (significandWide << 4) + d;
state = sNANHEX;
break;