diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-12 11:07:30 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-12 11:07:30 +0000 |
commit | 88d28fb7cd08938bc5f0f75d3fdb23d3df2c762f (patch) | |
tree | f1892d585bf07564456d91418708a134e87e39b5 /test/ruby | |
parent | 1472ca90671c8c0f9b310e80723530ac2a5073d6 (diff) | |
download | ruby-88d28fb7cd08938bc5f0f75d3fdb23d3df2c762f.tar.gz |
vsnprintf.c: fix buffer overflow
* vsnprintf.c (MAXEXP, MAXFRACT): calculate depending on constants in
float.h.
* vsnprintf.c (BSD_vfprintf): limit length for cvt() to get rid of
buffer overflow. [ruby-core:57023] [Bug #8864]
* vsnprintf.c (exponent): make expbuf size more precise.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_sprintf_comb.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_sprintf_comb.rb b/test/ruby/test_sprintf_comb.rb index 20852f9f2f..c58ddf4f15 100644 --- a/test/ruby/test_sprintf_comb.rb +++ b/test/ruby/test_sprintf_comb.rb @@ -545,7 +545,7 @@ class TestSprintfComb < Test::Unit::TestCase combination(%w[e E f g G], [nil, 0, 5, 20], - ["", ".", ".0", ".8", ".20", ".200"], + ["", ".", ".0", ".8", ".20", ".200", ".9999"], *FLAGS) {|type, width, precision, sp, hs, pl, mi, zr| format = "%#{sp}#{hs}#{pl}#{mi}#{zr}#{width}#{precision}#{type}" define_method("test_format_float(#{format})", assertions_format_float(format)) |