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

ruby-changes:39494

From: nobu <ko1@a...>
Date: Fri, 14 Aug 2015 18:42:24 +0900 (JST)
Subject: [ruby-changes:39494] nobu:r51575 (trunk): win32/registry.rb: terminator size

nobu	2015-08-14 18:42:13 +0900 (Fri, 14 Aug 2015)

  New Revision: 51575

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

  Log:
    win32/registry.rb: terminator size
    
    * ext/win32/lib/win32/registry.rb (API#SetValue): add terminator
      size, not 1 byte.  [ruby-core:70365] [Bug #11439]

  Modified files:
    trunk/ChangeLog
    trunk/ext/win32/lib/win32/registry.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51574)
+++ ChangeLog	(revision 51575)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Aug 14 18:40:43 2015  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/win32/lib/win32/registry.rb (API#SetValue): add terminator
+	  size, not 1 byte.  [ruby-core:70365] [Bug #11439]
+
 Thu Aug 13 22:49:42 2015  Juanito Fatas  <katehuang0320@g...>
 
 	* lib/timeout.rb (Timeout#timeout): freeze a string message to
Index: ext/win32/lib/win32/registry.rb
===================================================================
--- ext/win32/lib/win32/registry.rb	(revision 51574)
+++ ext/win32/lib/win32/registry.rb	(revision 51575)
@@ -326,7 +326,7 @@ For detail, see the MSDN[http://msdn.mic https://github.com/ruby/ruby/blob/trunk/ext/win32/lib/win32/registry.rb#L326
         case type
         when REG_SZ, REG_EXPAND_SZ, REG_MULTI_SZ
           data = data.encode(WCHAR)
-          size ||= data.size + 1
+          size ||= data.size + WCHAR_SIZE
         end
         check RegSetValueExW.call(hkey, make_wstr(name), 0, type, data, size)
       end

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

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