aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
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 015ff6cd5c..5d2f4b63e2 100644
--- a/io.c
+++ b/io.c
@@ -9103,6 +9103,7 @@ setup_narg(ioctl_req_t cmd, VALUE *argp, int io_p)
/* expand for data + sentinel. */
if (slen < len+1) {
rb_str_resize(arg, len+1);
+ MEMZERO(RSTRING_PTR(arg)+slen, char, len-slen);
slen = len+1;
}
/* a little sanity check here */