Wireshark-dev: Re: [Wireshark-dev] OpenSafety bug - how to fix?
From: Roland Knall <rknall@xxxxxxxxx>
Date: Wed, 28 Sep 2011 11:00:23 +0200
Patch has been submitted

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6400

regards,
Roland


On Tue, Sep 20, 2011 at 7:39 PM, Chris Maynard <Chris.Maynard@xxxxxxxxx> wrote:
> Roland Knall <rknall@...> writes:
>
>>
>> The fix is correct. Are there any other Coverty hits for openSafety,
>> or just the one?
>
> Hi Roland,
> There are 6 in total.  Besides 1204, there are these 5 more reported:
>
> CID 1215: NULL RETURNS:
> In stringToBytes(), strtok() could return NULL at line 418, but the return value
> is not checked against NULL as it is in other places, even further down in the
> same function at line 427.
>
> CID 1224: SIZEOF MISMATCH (2 instances):
> In dissect_opensafety_ssdo_message() at lines 932 and 951, Coverity reports,
> "suspicious_sizeof: Passing argument "sizeof (guint8 *) /*8*/ * payloadSize" to
> function "ep_alloc" and then casting the return value to "guint8 *" is
> suspicious."
>
> These 2 seem benign to me and can probably be ignored?
>
> CID 1246/1247: FORWARD NULL/REVERSE INULL:
> In opensafety_package_dissector(), pinfo is checked for being non-NULL at line
> 1374, implying that it could be NULL; yet it is passed to functions that
> dereference it before checking against NULL (such as add_new_data_source() at
> lines 1278 and 1284, call_dissector() at line 1370, etc.)
>
> Can pinfo really ever be NULL?  If not, the easiest thing to do might be just to
> remove the check at line 1374.
>
>
> If you could submit a patch fixing all these, it would be appreciated.
> Thanks,
> - Chris
>
>
>
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives:    http://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
>