http://bugs.winehq.org/show_bug.cgi?id=12838
--- Comment #16 from dimaki dimaki@rocketmail.com 2010-05-17 15:18:46 --- (In reply to comment #15)
So, when loading a profile Windows skips (and later restores) any data before an initial "["? Even if it is not binary data, but just text?
Hi Wolfram and thank you very much for looking into this.
The main problem here is a design flaw in Wine's profile.c This module contains so called "Profile" functions which deal with reading and writing from/to .ini files. Wine's profile.c internally stores parsed ini file data as null terminated strings. In fact this is wrong, because these Profile functions on Windows do not strip out NULL bytes/characters from an original ini file, but rather leave them in place when the ini file gets written back after modification. To do this one of course cannot use NULL bytes/characters for termination to store the parsed data strings before possibly modifying the data and writing it back.
What happens in this particular case is that the Spiceworks installer for some braindead reason uses WritePrivateProfileStringA which is one of the Profile functions in question to write some ini crap to the end of a bunch of BMP files used in the installer wizard. Due to the fact that these bitmap files are of course binary files that contain NULL bytes and profile.c parsing code is incapable of parsing and internally storing NULLs bytes properly, the resulting files are badly currupted and don't display in the installer.
Hope this clears things up a bit.