diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-29 07:06:21 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-29 07:06:21 +0000 |
commit | a7e0a3886e396dff52cda53f983e614e88069644 (patch) | |
tree | 4c2d76c61233f744695da926d8a58fc21cdc0ef9 /ext/stringio | |
parent | 82ee5772e71daef31e2675d49c4a374415c2d4eb (diff) | |
download | ruby-a7e0a3886e396dff52cda53f983e614e88069644.tar.gz ruby-a7e0a3886e396dff52cda53f983e614e88069644.tar.xz ruby-a7e0a3886e396dff52cda53f983e614e88069644.zip |
* ext/stringio/stringio.c (strio_write): insufficiently filled string
being extended when overwriting. [ruby-core:03836]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/stringio')
-rw-r--r-- | ext/stringio/stringio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index 4d960c4ea..f46af0f0a 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -794,7 +794,7 @@ strio_write(self, str) else { if (ptr->pos + len > olen) { rb_str_resize(ptr->string, ptr->pos + len); - MEMZERO(RSTRING(ptr->string)->ptr + olen, char, ptr->pos - olen); + MEMZERO(RSTRING(ptr->string)->ptr + olen, char, ptr->pos + len - olen); } else { rb_str_modify(ptr->string); |