[ruby-cvs:50060] nobu:r42918 (trunk): vsnprintf.c: fix buffer overflow

nobu at ruby-lang.org nobu at ruby-lang.org
Thu Sep 12 20:07:31 JST 2013


nobu	2013-09-12 20:07:30 +0900 (Thu, 12 Sep 2013)

  New Revision: 42918

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42918

  Log:
    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.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_sprintf_comb.rb
    trunk/vsnprintf.c


More information about the ruby-cvs mailing list