Skip to content
  • NARUSE, Yui's avatar
    ade02f3c
    merge revision(s) 051a8743: [Backport #20096] · ade02f3c
    NARUSE, Yui authored
    	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(-)
    ade02f3c
    merge revision(s) 051a8743: [Backport #20096]
    NARUSE, Yui authored
    	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(-)
Loading