ruby-changes:37687
From: nobu <ko1@a...>
Date: Fri, 27 Feb 2015 13:58:05 +0900 (JST)
Subject: [ruby-changes:37687] nobu:r49768 (trunk): io.c: wipe away ioctl buffer
nobu 2015-02-27 13:57:51 +0900 (Fri, 27 Feb 2015) New Revision: 49768 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49768 Log: 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>. Modified files: trunk/ChangeLog trunk/io.c Index: ChangeLog =================================================================== --- ChangeLog (revision 49767) +++ ChangeLog (revision 49768) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Feb 27 13:57:48 2015 Nobuyoshi Nakada <nobu@r...> + + * 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@g...> * spec/default.mspec: use default configuration file name. Index: io.c =================================================================== --- io.c (revision 49767) +++ io.c (revision 49768) @@ -9103,6 +9103,7 @@ setup_narg(ioctl_req_t cmd, VALUE *argp, https://github.com/ruby/ruby/blob/trunk/io.c#L9103 /* 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 */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/