summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-30 14:11:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-30 14:11:56 +0000
commit347da440cfefc7eec1d182110f4b42ac8e9af27b (patch)
tree3715717e1516f08d222326233db069e45c3cfdb7 /io.c
parent24a72a177d3006482abe0bfe7d531d6575361679 (diff)
ensure paths NUL-terminated
* dir.c (check_dirname): ensure path name NUL-terminated for SHARABLE_MIDDLE_SUBSTRING. * io.c (rb_sysopen): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/io.c b/io.c
index 40d8920..184f0e6 100644
--- a/io.c
+++ b/io.c
@@ -5444,6 +5444,7 @@ rb_sysopen(VALUE fname, int oflags, mode_t perm)
struct sysopen_struct data;
data.fname = rb_str_encode_ospath(fname);
+ StringValueCStr(data.fname);
data.oflags = oflags;
data.perm = perm;