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 | cbeec4561285b6afe00cd9bd61eebe9f5e3a6919 (patch) | |
tree | 7a1074c3bb86df5c860791df1178a3b9bfda93a3 /util.c | |
parent | a6c52eec0c12226d2c1a86597fa59ff0c2516533 (diff) | |
download | ruby-cbeec4561285b6afe00cd9bd61eebe9f5e3a6919.tar.gz |
* 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/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) |