summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2022-05-25 19:49:51 +1200
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2022-05-25 21:50:53 +1200
commit952ff7fbb3d1d4e9f13a4124016cb805c3a06a51 (patch)
tree2de9110bd87b71ed8cf7dc1c758f7413a2354fc4 /io.c
parent86602484a28fe345d9d164fe33d765d5e2791c58 (diff)
Fix out of bounds read.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5940
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/io.c b/io.c
index defdecd7d9..dab1d945f9 100644
--- a/io.c
+++ b/io.c
@@ -2096,8 +2096,7 @@ rb_io_writev(VALUE io, int argc, const VALUE *argv)
do rb_io_write(io, *argv++); while (--argc);
- /* unused right now */
- return argv[0];
+ return Qnil;
}
return rb_funcallv(io, id_write, argc, argv);