diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-13 01:15:39 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-13 01:15:39 +0000 |
commit | 2590d7447a96ba81a1ea2ae5b0e705f00a1631ac (patch) | |
tree | a120d3f77c83afe93ddb6ee27514c0812d822b12 /util.c | |
parent | 1973984f903fd6149034308e4723aa090801b69a (diff) | |
download | ruby-2590d7447a96ba81a1ea2ae5b0e705f00a1631ac.tar.gz |
* util.c (ruby_strtod): reject Float('0x0.').
[ruby-dev:42239] Bug #3820
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -2122,6 +2122,7 @@ break2: static const char hexdigit[] = "0123456789abcdef0123456789ABCDEF"; s0 = ++s; adj = 0; + aadj = -1; if (!*++s || !(s1 = strchr(hexdigit, *s))) goto ret0; do { @@ -2159,6 +2160,7 @@ break2: dval(rv) = ldexp(adj, nd * dsign); } else { + if (aadj != -1) goto ret0; dval(rv) = adj; } goto ret; |