From 1635979ed88dae20542db13b637f68942e99ed3b Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 18 Oct 2005 23:29:24 +0000 Subject: * 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/trunk@9415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ file.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 666bde2eb..4dbe7f893 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Oct 19 08:28:32 2005 Nobuyoshi Nakada + + * 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 * enumerator.c, eval.c, gc.c, parse.y, regparse.c, sjis.c, time.c: diff --git a/file.c b/file.c index d7a8d07cc..f9e6f752f 100644 --- a/file.c +++ b/file.c @@ -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) { -- cgit