diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | file.c | 3 |
2 files changed, 6 insertions, 2 deletions
@@ -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 @@ -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 = '/'; } |