[Bug 37575] New: regedit: duplicated null charactors
wine-bugs at winehq.org
wine-bugs at winehq.org
Sun Nov 16 23:38:47 CST 2014
https://bugs.winehq.org/show_bug.cgi?id=37575
Bug ID: 37575
Summary: regedit: duplicated null charactors
Product: Wine
Version: unspecified
Hardware: x86
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: programs
Assignee: wine-bugs at winehq.org
Reporter: s.wanabe at gmail.com
Distribution: ---
regedit.exe seems add duplicate null charactors when type of value is "str".
$ echo "[HKEY_LOCAL_MACHINE\\SYSTEM]" $'\n''"TestKey"=str:"a"'|wine regedit -
$ wine C:/Ruby200/bin/ruby.exe -rwin32/registry -e
'Win32::Registry::HKEY_LOCAL_MACHINE.open("SYSTEM") do |reg| p
reg.read("TestKey") end'
[1, "a\u0000"]
$ echo "[HKEY_LOCAL_MACHINE\\SYSTEM]" $'\n''"TestKey"=hex(1):61, 00, 00,
00'|wine regedit -
$ wine C:/Ruby200/bin/ruby.exe -rwin32/registry -e
'Win32::Registry::HKEY_LOCAL_MACHINE.open("SYSTEM") do |reg| p
reg.read("TestKey") end'
[1, "a"]
I guess this is due to programs/regedit/regproc.c.
static LONG setValue(WCHAR* val_name, WCHAR* val_data, BOOL is_unicode)
{
...
val_data[dwLen-1] = '\0'; /* remove last quotes */
lpbData = (BYTE*) val_data;
dwLen++; /* include terminating null */
...
}
"include terminating null" should be discarded because "remove last quotes"
already add terminating null.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list