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 | c04e4de09eb4c4ace9a0eb822f60878df98a258b (patch) | |
| tree | 59bc007348cb954774c10c564dc76fe480f3dacd | |
| parent | 8f7cc904b651f3267daeb3ad757226b43273142f (diff) | |
| download | ruby-c04e4de09eb4c4ace9a0eb822f60878df98a258b.tar.gz ruby-c04e4de09eb4c4ace9a0eb822f60878df98a258b.tar.xz ruby-c04e4de09eb4c4ace9a0eb822f60878df98a258b.zip | |
* file.c (rb_file_join): elements may contain null pointer strings.
report and fixed by Lloyd Zusman (hippoman): [ruby-core:06326]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | file.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Wed Oct 19 08:28:32 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * file.c (rb_file_join): elements may contain null pointer strings. + report and fixed by Lloyd Zusman (hippoman): [ruby-core:06326] + Wed Oct 19 02:34:33 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> * eval.c, gc.c, time.c: made internal symbols static. [ruby-dev:27435] @@ -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) { |
