diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-16 13:45:29 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-16 13:45:29 +0000 |
commit | d969620ea8892b580cf7d14a0f3c26c4fea1275f (patch) | |
tree | 82d55c2dc20588c8728a2532021ba3d187049d7f | |
parent | 9c1bf098e0c7cc9c0d4761ca951d57c4a1766c40 (diff) | |
download | ruby-d969620ea8892b580cf7d14a0f3c26c4fea1275f.tar.gz |
* encoding.c (enc_register_at): make own copy. [ruby-dev:33136]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | encoding.c | 1 |
2 files changed, 5 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Wed Jan 16 22:45:27 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * encoding.c (enc_register_at): make own copy. [ruby-dev:33136] + Wed Jan 16 18:03:10 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * io.c (pipe_open, rb_io_s_popen): clear temporary object to release diff --git a/encoding.c b/encoding.c index 4b121ac4e1..4fc8236662 100644 --- a/encoding.c +++ b/encoding.c @@ -146,6 +146,7 @@ enc_register_at(int index, const char *name, rb_encoding *encoding) { struct rb_encoding_entry *ent = &enc_table.list[index]; + name = strdup(name); ent->name = name; if (!ent->enc) ent->enc = malloc(sizeof(rb_encoding)); *ent->enc = *encoding; |