summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-14 10:46:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-14 10:46:00 +0000
commit7a332f23ce609f6c2e224d030135db7df4af5d66 (patch)
treee72448fdd856a34cfdf5e3707308cb49d94263dc /file.c
parentf34f20ebc5ef12d37315d8228ba21b6cd4bcb9a1 (diff)
* file.c (file_expand_path): root must follow buf when
reallocated. [ruby-talk:69339], [ruby-dev:20025] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/file.c b/file.c
index 93ed79b..079d8cc 100644
--- a/file.c
+++ b/file.c
@@ -1677,7 +1677,9 @@ file_expand_path(fname, dname, result)
case '\\':
#endif
if (s > b) {
+ long rootdiff = root - buf;
BUFCHECK(p + (s-b+1) >= pend);
+ root = buf + rootdiff;
memcpy(++p, b, s-b);
p += s-b;
*p = '/';