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@winehq.org Reporter: s.wanabe@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.
https://bugs.winehq.org/show_bug.cgi?id=37575
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |00cpxxx@gmail.com
--- Comment #1 from Bruno Jesus 00cpxxx@gmail.com --- I touched this code recently but didn't change that part. I'll take a look.
https://bugs.winehq.org/show_bug.cgi?id=37575
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #2 from Anastasius Focht focht@gmx.net --- *** Bug 37820 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=37575
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Version|unspecified |1.7.31 Summary|regedit: duplicated null |regedit: duplicated null |charactors |characters Ever confirmed|0 |1
--- Comment #3 from Anastasius Focht focht@gmx.net --- Confirming since I merged my bug here.
https://bugs.winehq.org/show_bug.cgi?id=37575
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |a53371497f62ee4ff5a379941cc | |2cd58ac5cbb4d Status|NEW |RESOLVED CC| |sebastian@fds-team.de Resolution|--- |FIXED
--- Comment #4 from Sebastian Lackner sebastian@fds-team.de --- Fixed by http://source.winehq.org/git/wine.git/commit/a53371497f62ee4ff5a379941cc2cd5....
https://bugs.winehq.org/show_bug.cgi?id=37575
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.44.