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

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Oct 30 20:54:11 CDT 2014


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

            Bug ID: 37483
           Summary: Possible null pointer dereference: lpItem - otherwise
                    it is redundant to check it (Cppcheck)
           Product: Wine
           Version: 1.7.29
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: comctl32
          Assignee: wine-bugs at winehq.org
          Reporter: 00cpxxx at gmail.com
      Distribution: ---

[dlls\comctl32\listview.c:4222] -> [dlls\comctl32\listview.c:4247]: (warning)
Possible null pointer dereference: lpItem - otherwise it is redundant to check
it 

lpItem may be null but later it's used without check:

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

...

 4222     if ((lpLVItem->mask & LVIF_IMAGE) && (lpItem->hdr.iImage !=
lpLVItem->iImage))
 4223         uChanged |= LVIF_IMAGE;
 4224 
 4225     if ((lpLVItem->mask & LVIF_PARAM) && (lpItem->lParam !=
lpLVItem->lParam))
 4226         uChanged |= LVIF_PARAM;

-- 
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