diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-18 23:29:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-18 23:29:24 +0000 |
commit | 62de00b7d103b456fbf6bf8dec58c50c364fa16a (patch) | |
tree | 9c825acc6b447da626e9e3637abfffef820b817b /file.c | |
parent | 41771ae6c1a8164a6666aad436dc3031da761beb (diff) | |
download | ruby-62de00b7d103b456fbf6bf8dec58c50c364fa16a.tar.gz |
* 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/trunk@9415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2745,7 +2745,7 @@ rb_file_join(VALUE ary, VALUE 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) { |