summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--file.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 64aa5c0..a729018 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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]
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) {