diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-01 10:36:19 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-01 10:36:19 +0000 |
| commit | 9f87ee744cecc7d33806c03812fc11dd967efc0b (patch) | |
| tree | 7a1074c3bb86df5c860791df1178a3b9bfda93a3 /util.c | |
| parent | b1cb3a834a9ba0f5c89501ad9cfbd4834914917f (diff) | |
| download | ruby-9f87ee744cecc7d33806c03812fc11dd967efc0b.tar.gz ruby-9f87ee744cecc7d33806c03812fc11dd967efc0b.tar.xz ruby-9f87ee744cecc7d33806c03812fc11dd967efc0b.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@22692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'util.c')
| -rw-r--r-- | util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3362,7 +3362,7 @@ ruby_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) |
