mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
fa50f60316
commit
aa9c627fd2
2 changed files with 6 additions and 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]
|
||||
|
|
2
file.c
2
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue