Description
Somehow it is possible to put a REG_SZ into the windows registry without terminating \0 characters.
We have this bug in one rare case where a device driver puts its device file name into the registry. regedit will show the string correctly, also regedt32.exe.
With regedt32.exe you can clearly see that the binary information of the string does not contain two trailing 00 00 bytes.
When reading this String with QSettings, Qt will give you the string with garbage appended because the string is not correctly terminated.
Possible fix:
Change line 488 in qsettings_win.cpp from
QByteArray data(dataSize, 0);
to
QByteArray data(dataSize + 2, 0);
This will ensure, that the the String has always terminating null characters.