comctl32/treeview: always allocate the pszText field

Jan de Mooij jandemooij at
Tue Sep 16 06:40:08 CDT 2008


treeview.c has this comment in the header:
* Note2: All items always! have valid (allocated) pszText field.

This is currently not true if an item is added without the TVIF_TEXT flag.
FileZilla 3 for example adds a dummy item without TVIF_TEXT flag and
later tries to retrieve the text, resulting in a crash.

My patch makes sure we always allocate the pszText field, so it's safe
for other functions to access it.
I ran the test on XP and 98 SE.

This fixes bug 11194.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-comctl32-treeview-always-allocate-pszText-field.patch
Type: text/x-patch
Size: 3501 bytes
Desc: not available
Url : 

More information about the wine-patches mailing list