[前][次][番号順一覧][スレッド一覧]

ruby-changes:39557

From: nobu <ko1@a...>
Date: Wed, 19 Aug 2015 16:57:43 +0900 (JST)
Subject: [ruby-changes:39557] nobu:r51638 (trunk): io.c: initialize variable

nobu	2015-08-19 16:57:20 +0900 (Wed, 19 Aug 2015)

  New Revision: 51638

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51638

  Log:
    io.c: initialize variable
    
    * io.c (rb_io_each_codepoint): fix use of uninitialized variable.
      [Bug #11444]

  Modified files:
    trunk/io.c
Index: io.c
===================================================================
--- io.c	(revision 51637)
+++ io.c	(revision 51638)
@@ -3709,6 +3709,7 @@ rb_io_each_codepoint(VALUE io) https://github.com/ruby/ruby/blob/trunk/io.c#L3709
     READ_CHECK(fptr);
     if (NEED_READCONV(fptr)) {
 	SET_BINARY_MODE(fptr);
+	r = 1;		/* no invalid char yet */
 	for (;;) {
 	    make_readconv(fptr, 0);
 	    for (;;) {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]