From 88d28fb7cd08938bc5f0f75d3fdb23d3df2c762f Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 12 Sep 2013 11:07:30 +0000 Subject: 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 --- test/ruby/test_sprintf_comb.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') 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)) -- cgit v1.2.3