summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-12 09:22:06 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-12 09:22:06 +0000
commitb12a9cfb59c4978d773cc13eee7987cc49c741b4 (patch)
tree8679a864f56223b18b82e5250917ed2ab216be96 /file.c
parent57008f89579d15db842f733db6f7ef8328a051b5 (diff)
merge revision(s) 37163:
* file.c (rb_get_path_check): path name must not contain NUL bytes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/file.c b/file.c
index 2659ef7..eead657 100644
--- a/file.c
+++ b/file.c
@@ -176,6 +176,9 @@ rb_get_path_check(VALUE obj, int level)
rb_raise(rb_eEncCompatError, "path name must be ASCII-compatible (%s): %s",
rb_enc_name(enc), RSTRING_PTR(tmp));
}
+
+ StringValueCStr(tmp);
+
return rb_str_new4(tmp);
}