You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(IAC-967) Append null terminators since it is no longer part of the data
Early ruby versions did not handle wide terminators correctly and would sometime
read past the end of the string causing segfaults. To prevent that, puppet
started embedding a wide terminator within the string. So the ruby string 'hi'
would be encoded as the three character string 'hi\0', and then that would be
encoded as UTF-16LE.
While this works, it creates ambiguity as to whether the "\0" character is part
of the data or not. For example, "hi\n\0".chop is "hi\n" whereas "hi\n".chop is
"hi", and is probably what was intended.
Ruby has since fixed its wide terminator handling, and as of Puppet 7, the
`wide_string` method no longer embeds a terminator in the string. So update the
registry module to explicitly add the terminator(s) before calling
RegSetValueExW`.
0 commit comments