ruby-changes:11556
From: naruse <ko1@a...>
Date: Wed, 15 Apr 2009 12:00:46 +0900 (JST)
Subject: [ruby-changes:11556] Ruby:r23190 (trunk): * dir.c (fnmatch_helper): use rb_enc_precise_mbclen and
naruse 2009-04-15 12:00:31 +0900 (Wed, 15 Apr 2009) New Revision: 23190 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23190 Log: * dir.c (fnmatch_helper): use rb_enc_precise_mbclen and fail if bytes are invalid. [ruby-dev:38307] Modified files: trunk/ChangeLog trunk/dir.c trunk/version.h Index: ChangeLog =================================================================== --- ChangeLog (revision 23189) +++ ChangeLog (revision 23190) @@ -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: dir.c =================================================================== --- dir.c (revision 23189) +++ dir.c (revision 23190) @@ -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; Index: version.h =================================================================== --- version.h (revision 23189) +++ version.h (revision 23190) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_RELEASE_DATE "2009-04-14" +#define RUBY_RELEASE_DATE "2009-04-15" #define RUBY_PATCHLEVEL -1 #define RUBY_BRANCH_NAME "trunk" @@ -8,7 +8,7 @@ #define RUBY_VERSION_TEENY 1 #define RUBY_RELEASE_YEAR 2009 #define RUBY_RELEASE_MONTH 4 -#define RUBY_RELEASE_DAY 14 +#define RUBY_RELEASE_DAY 15 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/