[Bug 37483] Possible null pointer dereference: lpItem - otherwise it is redundant to check it (Cppcheck)

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Apr 4 01:55:33 CDT 2015


https://bugs.winehq.org/show_bug.cgi?id=37483

--- Comment #1 from Nikolay Sivov <bunglehead at gmail.com> ---
Hi, Bruno.

I don't see a problem with this. The idea here:

---
    if (infoPtr->dwStyle & LVS_OWNERDATA)
    {
    /* a virtual listview only stores selection and focus */
    if (lpLVItem->mask & ~LVIF_STATE)
        return FALSE;
    lpItem = NULL;
    }
---

is to return if any mask bit but LVIF_STATE is set. So lpItem is only NULL when
lpLVItem->mask == LVIF_STATE. Later mask is always tested before accessing
lpItem. I'll keep this open waiting for your reply, but I think there's no bug.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list