diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-27 04:57:51 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-27 04:57:51 +0000 |
commit | d8abb9daaf8713a2677ac705db39ba3f7ed9dca6 (patch) | |
tree | 1fc52245cce9773f4f78f4ef817318cc5f49fb1e | |
parent | 6bb470cf80aadf356f115d6e31a7791177b5c31c (diff) | |
download | ruby-d8abb9daaf8713a2677ac705db39ba3f7ed9dca6.tar.gz |
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 <dkay AT
kaist.ac.kr>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | io.c | 1 |
2 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,9 @@ +Fri Feb 27 13:57:48 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * io.c (setup_narg): wipe away expanded part of buffer to get rid + of revealing uncleaned data. reported by Dongkwan Kim <dkay AT + kaist.ac.kr>. + Wed Feb 25 22:25:07 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com> * spec/default.mspec: use default configuration file name. @@ -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 */ |