Author eryksun
Recipients SilentGhost, anshul6, eryksun, paul.moore, r.david.murray, random832, steve.dower, stutzbach, tim.golden, zach.ware
Date 2015-12-03.17:52:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> I don't like the idea of having a mismatch between what we set and
> what we get, even if what we're setting technically shouldn't be 
> allowed.

Currently if you set a string with null, you won't see it using either regedit.exe or reg.exe:

    >>> import os, winreg
    >>> data = "a string\x00 with a null"
    >>> HKCU = winreg.HKEY_CURRENT_USER
    >>> winreg.SetValueEx(HKCU, "test", 0, winreg.REG_SZ, data)
    >>> winreg.QueryValueEx(HKCU, "test")
    ('a string\x00 with a null', 1)

    >>> os.system('reg query HKCU /v test')

        test    REG_SZ    a string


The registry saves the whole buffer, agnostic to the type, but clearly Microsoft has documented and treats REG_SZ as a null-terminated string. We should follow suit.
Date User Action Args
2015-12-03 17:52:00eryksunsetrecipients: + eryksun, paul.moore, tim.golden, stutzbach, r.david.murray, SilentGhost, zach.ware, steve.dower, random832, anshul6
2015-12-03 17:52:00eryksunsetmessageid: <>
2015-12-03 17:52:00eryksunlinkissue25778 messages
2015-12-03 17:52:00eryksuncreate