ruby-changes:30113
From: nobu <ko1@a...>
Date: Thu, 25 Jul 2013 17:18:06 +0900 (JST)
Subject: [ruby-changes:30113] nobu:r42165 (trunk): file.c: clear coderange for user name
nobu 2013-07-25 17:17:55 +0900 (Thu, 25 Jul 2013) New Revision: 42165 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42165 Log: file.c: clear coderange for user name * file.c (rb_file_expand_path_internal): should clear coderange after copying user name as binary data. Modified files: trunk/ChangeLog trunk/file.c Index: ChangeLog =================================================================== --- ChangeLog (revision 42164) +++ ChangeLog (revision 42165) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Jul 25 17:17:52 2013 Nobuyoshi Nakada <nobu@r...> + + * file.c (rb_file_expand_path_internal): should clear coderange after + copying user name as binary data. + Thu Jul 25 16:17:55 2013 Koichi Sasada <ko1@a...> * encoding.c (check_encoding): Check T_DATA or not. Index: file.c =================================================================== --- file.c (revision 42164) +++ file.c (revision 42165) @@ -2993,6 +2993,7 @@ rb_file_expand_path_internal(VALUE fname https://github.com/ruby/ruby/blob/trunk/file.c#L2993 userlen = s - b; BUFCHECK(bdiff + userlen >= buflen); memcpy(p, b, userlen); + ENC_CODERANGE_CLEAR(result); rb_str_set_len(result, userlen); rb_enc_associate(result, enc); rb_home_dir_of(result, result); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/