http://bugs.winehq.org/show_bug.cgi?id=27497
Summary: Regedit mangles registry keys containing embedded NULLs Product: Wine Version: 1.3.22 Platform: x86 URL: http://www.gog.com/en/gamecard/sacrifice OS/Version: Linux Status: NEW Severity: minor Priority: P2 Component: programs AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
Created an attachment (id=35155) --> (http://bugs.winehq.org/attachment.cgi?id=35155) raw file
Noticed this while messing around with Sacrifice (http://www.gog.com/en/gamecard/sacrifice).
The game stores a few keys with embedded NULLs, apparently all the ones that store string values (dword/hex values aren't affected).
Looking at the raw registry (system.reg) shows the values fine: "Graphic detail"=dword:00000000 "IP address"="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "Key repeat delay"=dword:0000000a "Key repeat start"=dword:00000032
but if I export the key with wine's regedit, it mangles them: "Graphic detail"=dword:00000000 "IP address"=""Key repeat delay"=dword:0000000a "Key repeat start"=dword:00000032
notice how a quote goes missing along with the newline. The game really likes those newlines. If I remove them and rerun the game, then adjust its settings, it adds them back.
I'll attach a text file with the raw registry, along with what I get when exporting.
http://bugs.winehq.org/show_bug.cgi?id=27497
--- Comment #1 from Austin English austinenglish@gmail.com 2011-06-15 18:37:07 CDT --- Created an attachment (id=35156) --> (http://bugs.winehq.org/attachment.cgi?id=35156) export result
http://bugs.winehq.org/show_bug.cgi?id=27497
--- Comment #2 from butraxz@gmail.com 2013-12-07 02:51:05 CST --- This ticket has not been updated for over 900 days. Development recommends to check the status on your bug every release or two and let to be known if the bug is still present. If not, mark it fixed. If you are no longer able to put effort to this ticket, you can abandon it.
Is this still an issue with 1.7.8 or higher ?
http://bugs.winehq.org/show_bug.cgi?id=27497
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #35155|0 |1 is obsolete| |
--- Comment #3 from Austin English austinenglish@gmail.com --- Created attachment 46867 --> http://bugs.winehq.org/attachment.cgi?id=46867 raw file
Still in wine-1.7.8. Minor updates: A) I uploaded a new file to import, with a fixed header B) I get an error on import now: Warning! Unrecognized escape sequence: \0' C) when exporting, newlines aren't messed up, instead, the nulls are converted to 0: "CD Key"="AAAA-AAAA-AAAA-AAAA00000000000000000000000000000000000000000000"
https://bugs.winehq.org/show_bug.cgi?id=27497
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |c35bca6561a0150425a1838d467 | |7d202cad65da5 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #4 from Bruno Jesus 00cpxxx@gmail.com --- Importing strings with embedded NULLs is now supported. Exporting it back is not supported neither in XP nor in Windows 8 (possibly all versions).
Windows regedit will skip any lines that have embedded NULLs during the export process and also in the screen display. Currently wine will try to show and cut then and during the export it will also cut them in the first NULL.
IMO the main problem in this bug is fixed, which is about importing the strings. Windows will refuse to display strings with NULL because it would not be possible to edit in an easy way. I think we should drop the viewing of lines containing NULL data too because it's easier.
https://bugs.winehq.org/show_bug.cgi?id=27497
--- Comment #5 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 49867 --> https://bugs.winehq.org/attachment.cgi?id=49867 Comparison between .REG and displayed data
This is an screenshot from XP regedit after having imported the .REG file. Notice that the strings lines are missing because they have NULL chars.
https://bugs.winehq.org/show_bug.cgi?id=27497
--- Comment #6 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Bruno Jesus from comment #5)
Notice that the strings lines are missing because they have NULL chars.
Perhaps missing lines actually were not imported (skipped) into the registry?
https://bugs.winehq.org/show_bug.cgi?id=27497
--- Comment #7 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Dmitry Timoshkov from comment #6)
(In reply to Bruno Jesus from comment #5)
Notice that the strings lines are missing because they have NULL chars.
Perhaps missing lines actually were not imported (skipped) into the registry?
Lol, that would make me feel like a complete idiot. I'll check it properly.
https://bugs.winehq.org/show_bug.cgi?id=27497
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |00cpxxx@gmail.com Resolution|FIXED |---
--- Comment #8 from Bruno Jesus 00cpxxx@gmail.com --- Reopening for further investigation.
https://bugs.winehq.org/show_bug.cgi?id=27497
Hugh McMaster hugh.mcmaster@outlook.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hugh.mcmaster@outlook.com
--- Comment #9 from Hugh McMaster hugh.mcmaster@outlook.com --- This should be fixed by commit 62027322b05d3e0d72b2905a171e21becaf355d6.
Please test.
https://bugs.winehq.org/show_bug.cgi?id=27497
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=27497
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1|c35bca6561a0150425a1838d467 |62027322b05d3e0d72b2905a171 |7d202cad65da5 |e21becaf355d6 Status|REOPENED |RESOLVED Resolution|--- |FIXED
--- Comment #10 from Gijs Vermeulen gijsvrm@gmail.com --- (In reply to Hugh McMaster from comment #9)
Test file in Comment #3 imports without errors and export looks correct now.
Fixed by: 62027322b05d3e0d72b2905a171e21becaf355d6
https://bugs.winehq.org/show_bug.cgi?id=27497
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.12.
https://bugs.winehq.org/show_bug.cgi?id=27497
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.0.x
https://bugs.winehq.org/show_bug.cgi?id=27497
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.0.x |---
--- Comment #12 from Michael Stefaniuc mstefani@winehq.org --- Removing the 3.0.x milestone from bugs included in 3.0.3.