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

This commit is contained in:
Alexander Scott-Johns 2011-02-18 13:42:56 +00:00 committed by Alexandre Julliard
parent 46caa0d225
commit f2df2f38e6
1 changed files with 1 additions and 1 deletions

View File

@ -6743,7 +6743,7 @@ static BOOL LISTVIEW_GetItemExtT(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVIte
pszText = lpLVItem->pszText;
bResult = LISTVIEW_GetItemT(infoPtr, lpLVItem, isW);
if (bResult && lpLVItem->pszText != pszText)
if (bResult && (lpLVItem->mask & LVIF_TEXT) && lpLVItem->pszText != pszText)
{
if (lpLVItem->pszText != LPSTR_TEXTCALLBACKW)
textcpynT(pszText, isW, lpLVItem->pszText, isW, lpLVItem->cchTextMax);