summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-18 23:29:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-18 23:29:24 +0000
commitaa9c627fd2ecb9d9f48e7aebe21f6b19eb7b614e (patch)
tree59bc007348cb954774c10c564dc76fe480f3dacd /file.c
parentfa50f60316952ca9fcfe01eca75e5e2ff7946255 (diff)
* file.c (rb_file_join): elements may contain null pointer strings.
report and fixed by Lloyd Zusman (hippoman): [ruby-core:06326] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index d812d7f..2e465e2 100644
--- a/file.c
+++ b/file.c
@@ -2789,7 +2789,7 @@ rb_file_join(ary, sep)
name = StringValueCStr(result);
if (i > 0 && !NIL_P(sep)) {
tail = chompdirsep(name);
- if (isdirsep(RSTRING(tmp)->ptr[0])) {
+ if (RSTRING(tmp)->ptr && isdirsep(RSTRING(tmp)->ptr[0])) {
RSTRING(result)->len = tail - name;
}
else if (!*tail) {