From 8b8cce322b3ddaa4d2449215224110e8367b1854 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 12 Jul 2013 07:28:40 +0000 Subject: encoding.c: refill terminator at associating encoding * encoding.c (rb_enc_associate_index): refill the terminator if it becomes longer than before. [ruby-dev:47500] [Bug #8624] * string.c (str_null_char, str_fill_term): get rid of out of bound access. * string.c (rb_str_fill_terminator): add a parameter for the length of new terminator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- transcode.c | 1 - 1 file changed, 1 deletion(-) (limited to 'transcode.c') diff --git a/transcode.c b/transcode.c index 88908c3cf2..54fc316e41 100644 --- a/transcode.c +++ b/transcode.c @@ -2760,7 +2760,6 @@ str_encode_associate(VALUE str, int encidx) int cr = 0; rb_enc_associate_index(str, encidx); - rb_str_fill_terminator(str); /* transcoded string never be broken. */ if (rb_enc_asciicompat(rb_enc_from_index(encidx))) { -- cgit v1.2.3