diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-27 03:13:29 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-27 03:13:29 +0000 |
| commit | cb49b26e7ca353580f25fa47e388f8770f55031c (patch) | |
| tree | 1df77ad9d4fa422140519969e7dc29df1592dcbf | |
| parent | 95423b857d81d81f7071d00a51b812cf474cfab6 (diff) | |
* file.c (BUFCHECK): wrong condition. [ruby-core:16921]
* file.c (file_expand_buf): shouldn't use buflen for length of string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | file.c | 6 | ||||
| -rw-r--r-- | version.h | 6 |
3 files changed, 12 insertions, 6 deletions
@@ -1,3 +1,9 @@ +Tue May 27 12:13:17 2008 NAKAMURA Usaku <usa@ruby-lang.org> + + * file.c (BUFCHECK): wrong condition. [ruby-core:16921] + + * file.c (file_expand_buf): shouldn't use buflen for length of string. + Mon May 26 18:24:48 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * file.c (BUFCHECK): no resize if enough room. @@ -2497,7 +2497,7 @@ ntfs_tail(const char *path) #define BUFCHECK(cond) do {\ long bdiff = p - buf;\ - if (!(cond)) {\ + if (cond) {\ do {buflen *= 2;} while (cond);\ rb_str_resize(result, buflen);\ buf = RSTRING_PTR(result);\ @@ -2739,7 +2739,6 @@ file_expand_path(fname, dname, result) p += s-b; } if (p == skiproot(buf) - 1) p++; - buflen = p - buf; #if USE_NTFS *p = '\0'; @@ -2792,12 +2791,13 @@ file_expand_path(fname, dname, result) ++p; BUFCHECK(bdiff + len >= buflen); memcpy(p, wfd.cFileName, len + 1); + p += len; } } #endif if (tainted) OBJ_TAINT(result); - rb_str_set_len(result, buflen); + rb_str_set_len(result, p - buf); return result; } @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.8.7" -#define RUBY_RELEASE_DATE "2008-05-26" +#define RUBY_RELEASE_DATE "2008-05-27" #define RUBY_VERSION_CODE 187 -#define RUBY_RELEASE_CODE 20080526 +#define RUBY_RELEASE_CODE 20080527 #define RUBY_PATCHLEVEL 5000 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 7 #define RUBY_RELEASE_YEAR 2008 #define RUBY_RELEASE_MONTH 5 -#define RUBY_RELEASE_DAY 26 +#define RUBY_RELEASE_DAY 27 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; |
