From d8abb9daaf8713a2677ac705db39ba3f7ed9dca6 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 27 Feb 2015 04:57:51 +0000 Subject: io.c: wipe away ioctl buffer * io.c (setup_narg): wipe away expanded part of buffer to get rid of revealing uncleaned data. reported by Dongkwan Kim . git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 1 + 1 file changed, 1 insertion(+) (limited to 'io.c') 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 */ -- cgit v1.2.3