Opened 16 years ago
Closed 16 years ago
#5303 closed defect (fixed)
memset usage in mythcommflag a little wonky
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | mythtv | Version: | head |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
Not every compiler is going to do the right thing when given a sizeof(array) as the number of bytes it should be setting. But mythcommflag does this in a few places.
Attachments (2)
Change History (4)
Changed 16 years ago by
Attachment: | programs_mythcommflag_ClassicCommDetector.cpp-do-memset-correctly.patch added |
---|
Changed 16 years ago by
comment:1 Changed 16 years ago by
The second patch replaces the first. The static analysis checker I am using was shown to be at fault with exposing a defect associated with sizeof and variable size arrays. So the original code is correct with the sizeof call. The new patch only removes the referencing operator from the array since that is superfluous (and possibly incorrect).
Note: See
TracTickets for help on using
tickets.
reverts the sizeof back to original (it was/is correct), keeps referencing removal