diff options
| author | NARUSE, Yui <naruse@airemix.jp> | 2024-03-04 11:57:04 +0900 |
|---|---|---|
| committer | NARUSE, Yui <naruse@airemix.jp> | 2024-03-04 11:57:04 +0900 |
| commit | ade02f3c8909a8bf630af2c88f00b7bd7ff02682 (patch) | |
| tree | 4f0a23e314e850c799c580985eac5ec674366b29 /test/ruby/test_string.rb | |
| parent | 3f0e3ede02f7d4b31c9073c9eb912f11aa4349cd (diff) | |
merge revision(s) 051a874325c177e040301878069c2b28f5d06ce6: [Backport #20096]
Fix memory overread in registry.rb
The terminator is not actually getting filled in; we're simply passing
(two) bytes of empty memory as the NUL terminator. This can lead to
garbage characters getting written to registry values.
Fix this by explicitly putting a WCHAR_NUL character into the string to
be sent to the registry API, like we do in the MULTI_SZ case.
[Bug #20096]
---
ext/win32/lib/win32/registry.rb | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
Diffstat (limited to 'test/ruby/test_string.rb')
0 files changed, 0 insertions, 0 deletions
