8000 merge revision(s) 51575,51584: [Backport #11439] · github/ruby@911ade3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 911ade3

Browse files
committed
merge revision(s) 51575,51584: [Backport ruby#11439]
* ext/win32/lib/win32/registry.rb (API#SetValue): add terminator size, not 1 byte. [ruby-core:70365] [Bug ruby#11439] * ext/win32/lib/win32/registry.rb (API#SetValue): data size should be in bytes, not in chars. [ruby-core:70365] [Bug ruby#11439] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@51620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 26eb8e4 commit 911ade3

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

ChangeLog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
Mon Aug 17 23:27:45 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
2+
3+
* ext/win32/lib/win32/registry.rb (API#SetValue): data size should
4+
be in bytes, not in chars. [ruby-core:70365] [Bug #11439]
5+
6+
Mon Aug 17 23:27:45 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
7+
8+
* ext/win32/lib/win32/registry.rb (API#SetValue): add terminator
9+
size, not 1 byte. [ruby-core:70365] [Bug #11439]
10+
111
Mon Aug 17 17:57:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
212

313
* re.c (rb_memsearch): should match only char boundaries in wide

ext/win32/lib/win32/registry.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def SetValue(hkey, name, type, data, size)
315315
case type
316316
when REG_SZ, REG_EXPAND_SZ, REG_MULTI_SZ
317317
data = data.encode(WCHAR)
318-
size ||= data.size + 1
318+
size ||= data.bytesize + WCHAR_SIZE
319319
end
320320
check RegSetValueExW.call(hkey, make_wstr(name), 0, type, data, size)
321321
end

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define RUBY_VERSION "2.1.7"
22
#define RUBY_RELEASE_DATE "2015-08-17"
3-
#define RUBY_PATCHLEVEL 398
3+
#define RUBY_PATCHLEVEL 399
44

55
#define RUBY_RELEASE_YEAR 2015
66
#define RUBY_RELEASE_MONTH 8

0 commit comments

Comments
 (0)
0