summaryrefslogtreecommitdiff
path: root/file.c
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 /file.c
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
Diffstat (limited to 'file.c')
-rw-r--r--file.c1
1 files changed, 1 insertions, 0 deletions
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);