summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-12 09:18:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-12 09:18:07 +0000
commit7085db45e4f15a58f9a82c8815bcc31364e0fde1 (patch)
tree1a97fd82d4c00c6fa70951ab6ee387422228fb23 /file.c
parent84fa14aab12ef679ead8af2da2574db9b9a05c84 (diff)
file.c: poisoned NUL
* file.c (rb_get_path_check): path name must not contain NUL bytes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37163 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 6940142653..b27e769f57 100644
--- a/file.c
+++ b/file.c
@@ -184,6 +184,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);
}