regedit: Fix item text reading in regedit

Bruno Jesus 00cpxxx at gmail.com
Thu Apr 26 21:51:08 CDT 2012


The macro ListView_GetItemTextW takes the count of WCHAR as parameter,
not the count of WCHAR * sizeof(WCHAR). This leads to memory
corruption and random segfaults. The attached patch pass the correct
value and also simplify the item == 0 case and avoid double multiply
operation.

This problem currently is rare because it only happens with strings >
63 bytes since the current start allocation value is 128.

Fixes bug http://bugs.winehq.org/show_bug.cgi?id=22060
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-text-reading-in-regedit.patch
Type: application/octet-stream
Size: 1172 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20120426/ffb73328/attachment.obj>


More information about the wine-patches mailing list