summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-28 15:03:38 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-28 15:03:38 +0000
commit2fcd15d45d983469a2a67bbdb78da2ff1fc7bce4 (patch)
treef94240f9979603396736cd023ee82ac595737901
parentb283b1d81303039218d3e1a68ba104241cdf57cd (diff)
* file.c (file_expand_path): check invalid access.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--file.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index abd6d35693..b2885331cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Aug 29 00:03:13 2008 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * file.c (file_expand_path): check invalid access.
+
Thu Aug 28 23:55:50 2008 Shugo Maeda <shugo@ruby-lang.org>
* strftime.c (rb_strftime): Time.mktime(2000).strftime("%-S") should
diff --git a/file.c b/file.c
index fbbea23282..0cd90afb8b 100644
--- a/file.c
+++ b/file.c
@@ -2734,6 +2734,7 @@ file_expand_path(VALUE fname, VALUE dname, int abs_mode, VALUE result)
*p = '/';
}
+ BUFCHECK(bdiff + 1 >= buflen);
p[1] = 0;
root = skipprefix(buf);