Skip to content
Snippets Groups Projects
Commit 45387e3a authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard
Browse files

Do not send uninitialized data in notification to application.

parent c8ab54d1
No related branches found
No related tags found
No related merge requests found
......@@ -4871,10 +4871,20 @@ static BOOL LISTVIEW_GetItemT(LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, BOOL i
/* if we need to callback, do it now */
if ((lpLVItem->mask & ~LVIF_STATE) || infoPtr->uCallbackMask)
{
memcpy(&dispInfo.item, lpLVItem, sizeof(LVITEMW));
dispInfo.item.stateMask &= infoPtr->uCallbackMask;
/* NOTE: copy only fields which we _know_ are initialized, some apps
* depend on the uninitialized fields being 0 */
dispInfo.item.mask = lpLVItem->mask;
dispInfo.item.iItem = lpLVItem->iItem;
dispInfo.item.iSubItem = lpLVItem->iSubItem;
if (lpLVItem->mask & LVIF_TEXT)
{
dispInfo.item.pszText = lpLVItem->pszText;
dispInfo.item.cchTextMax = lpLVItem->cchTextMax;
}
if (lpLVItem->mask & LVIF_STATE)
dispInfo.item.stateMask = lpLVItem->stateMask & infoPtr->uCallbackMask;
notify_dispinfoT(infoPtr, LVN_GETDISPINFOW, &dispInfo, isW);
memcpy(lpLVItem, &dispInfo.item, sizeof(LVITEMW));
*lpLVItem = dispInfo.item;
TRACE(" getdispinfo(1):lpLVItem=%s\n", debuglvitem_t(lpLVItem, isW));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment