aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-06 22:15:18 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-06 22:15:18 +0000
commit0771b987a46a7533a0af1e4e936a4339944511c1 (patch)
tree21d27518003f532628dc39faf8116c06710c0c07
parent7ae76a9e6ba17c30cc049ccc3e796123675c72c2 (diff)
downloadruby-0771b987a46a7533a0af1e4e936a4339944511c1.tar.gz
* file.c (file_expand_path): applied a patch from Nobuhiro Tachino
in [ruby-dev:35948]. fix #491 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--file.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 34d11eb65d..6a7c2f9ab2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Sep 7 06:31:51 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * file.c (file_expand_path): applied a patch from Nobuhiro Tachino
+ in [ruby-dev:35948]. fix #491
+
Sun Sep 7 03:37:05 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* parse.y (f_block_optarg): allow default for block parameters as
diff --git a/file.c b/file.c
index 33327a6f96..dbaafd2e87 100644
--- a/file.c
+++ b/file.c
@@ -2728,8 +2728,7 @@ file_expand_path(VALUE fname, VALUE dname, int abs_mode, VALUE result)
if (p > buf && p[-1] == '/')
--p;
else {
- ++buflen;
- BUFCHECK(bdiff >= buflen);
+ BUFCHECK(bdiff + 1 >= buflen);
*p = '/';
}