ruby-changes:11697
From: yugui <ko1@a...>
Date: Mon, 4 May 2009 21:31:29 +0900 (JST)
Subject: [ruby-changes:11697] Ruby:r23337 (ruby_1_9_1): merges r23190 from trunk into ruby_1_9_1.
yugui 2009-05-04 21:30:33 +0900 (Mon, 04 May 2009) New Revision: 23337 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23337 Log: merges r23190 from trunk into ruby_1_9_1. -- * dir.c (fnmatch_helper): use rb_enc_precise_mbclen and fail if bytes are invalid. [ruby-dev:38307] Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/dir.c Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 23336) +++ ruby_1_9_1/ChangeLog (revision 23337) @@ -1,3 +1,8 @@ +Wed Apr 15 11:53:35 2009 NARUSE, Yui <naruse@r...> + + * dir.c (fnmatch_helper): use rb_enc_precise_mbclen and + fail if bytes are invalid. [ruby-dev:38307] + Tue Apr 14 18:11:26 2009 Nobuyoshi Nakada <nobu@r...> * dir.c (bracket): if same in bytes, path is matching. Index: ruby_1_9_1/dir.c =================================================================== --- ruby_1_9_1/dir.c (revision 23336) +++ ruby_1_9_1/dir.c (revision 23337) @@ -224,7 +224,9 @@ RETURN(ISEND(p) ? 0 : FNM_NOMATCH); if (ISEND(p)) goto failed; - r = rb_enc_mbclen(p, pend, enc); + r = rb_enc_precise_mbclen(p, pend, enc); + if (!MBCLEN_CHARFOUND_P(r)) + goto failed; if (r <= (send-s) && memcmp(p, s, r) == 0) { p += r; s += r; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/