1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* util.c (ruby_dtoa): allocates one more byte to get rid of buffer

overrun.  a patch from Charlie Savage at [ruby-core:22604].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-03-01 10:41:26 +00:00
parent 643bfbb49c
commit 64603725aa
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Sun Mar 1 19:41:25 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* util.c (ruby_dtoa): allocates one more byte to get rid of buffer
overrun. a patch from Charlie Savage at [ruby-core:22604].
Sun Mar 1 17:27:14 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/bigdecimal/bigdecimal.c (gfDebug): uncommented out.

2
util.c
View file

@ -3409,7 +3409,7 @@ dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve)
if (i <= 0)
i = 1;
}
s = s0 = rv_alloc(i);
s = s0 = rv_alloc(i+1);
#ifdef Honor_FLT_ROUNDS
if (mode > 1 && rounding != 1)