comctl32: Fix read of uninitialized data in LISTVIEW_GetItemExtT when LVIF_TEXT is not set (Valgrind).

Nikolay Sivov bunglehead at
Sat Feb 19 08:01:58 CST 2011

On 2/19/2011 16:49, Alexander Scott-Johns wrote:
> On 19 February 2011 11:42, Nikolay Sivov<bunglehead at>  wrote:
>> I think it's enough to add a mask check here:
>> ---
>>     if (bResult&&  lpLVItem->pszText != pszText)
>> ---
>> to keep a single call of GetItem.
> But isn't
>       pszText = lpLVItem->pszText;
> undefined behaviour if lpLVItem->pszText is not initialized?
No, it's not undefined as long as you don't dereference it. Valgrind 
catches condition that depends on this uninitialized value, not 
assignment of course.

By the way, we even have a report for that -

More information about the wine-devel mailing list