Wireshark-bugs: [Wireshark-bugs] [Bug 6878] Overhaul of tvb_get_bitsxx() functions

Date: Wed, 4 Apr 2012 18:30:15 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6878

--- Comment #14 from Chris Maynard <christopher.maynard@xxxxxxxxx> 2012-04-04 18:30:14 PDT ---
(In reply to comment #13)
> (In reply to comment #11)
> > In this case Coverity is (I believe) wrong, as line 1782 is guaranteeing that
> > total number of bits is less than 8.  
> > 
> > Is Coverity pacified by adding an assertion to this effect?
> 
> It looks like total_no_of_bits can be greater than 8 if bit_offset is negative.
> I checked in a change in r41945 to make bit_offset unsigned. Hopefully this
> will fix the CIDs.

I could be wrong (heck, I was wrong in believing Coverity that these were valid
complaints), but my guess is that Coverity won't be appeased by this change,
just judging by the wording of their details about the bug, namely,
"index_parm_in_call: Called function indexes parameter." and "index_parm:
Directly indexing parameter."

If the relevant CIDs don't vanish, I think it would still be nice to somehow
pacify Coverity though (perhaps by the "%8" as Mike suggested in comment 12). 
The OVERRUN_STATIC checker type is one of those types that has unveiled real
bugs in the past, but with all these false positives, it will be more difficult
to spot the real ones in the noise of these false ones.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.