diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-15 03:00:31 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-15 03:00:31 +0000 |
commit | 31c1883a54335d4ecad81919d8f9cb7a0fc4ffce (patch) | |
tree | 7c29b8c910bf8d7a01dd2fef6b6ae2e8c0886201 | |
parent | 205c4b490cf4d66484f7357646cbf8748e427c5b (diff) | |
download | ruby-31c1883a54335d4ecad81919d8f9cb7a0fc4ffce.tar.gz |
* dir.c (fnmatch_helper): use rb_enc_precise_mbclen and
fail if bytes are invalid. [ruby-dev:38307]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | dir.c | 4 | ||||
-rw-r--r-- | version.h | 4 |
3 files changed, 10 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Wed Apr 15 11:53:35 2009 NARUSE, Yui <naruse@ruby-lang.org> + + * 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@ruby-lang.org> * dir.c (bracket): if same in bytes, path is matching. @@ -224,7 +224,9 @@ fnmatch_helper( 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; @@ -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[]; |