summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--dir.c4
-rw-r--r--version.h4
3 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index bdc88b783e..56b9a48872 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/dir.c b/dir.c
index 522818b663..be642d38eb 100644
--- a/dir.c
+++ b/dir.c
@@ -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;
diff --git a/version.h b/version.h
index 7fbe6adb9c..6b9a1e90d7 100644
--- a/version.h
+++ b/version.h
@@ -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[];