Wireshark mailing list archives

Re: r42853: Add a null check to fix Coverity CID 280210?(packet-jxta.c)


From: Jakub Zawadzki <darkjames-ws () darkjames pl>
Date: Thu, 31 May 2012 00:47:15 +0200

On Mon, May 28, 2012 at 05:06:39PM +0000, Christopher Maynard wrote:
Jakub Zawadzki <darkjames-ws@...> writes:

I don't have access to coverity scans, and I really don't know what 
CID 280210 means,

You should be able to get access if you want it.  Here's the relevant question
in their FAQ regarding accounts:
http://scan.coverity.com/developers-faq.html#get-account.  When I got access, I
just sent a request to Coverity, but maybe now Gerald has to approve?  Or maybe
Gerald did approve and I just didn't realize it. 

Well I don't care much about access to coverity scans,
I think there is plenty of bugs to fix in wireshark BTS ;-)

Maybe CID 280210 is about 'tpt_conv_data' variable?

I think you're right.  Here's the relevant Coverity information:

537        tpt_conversation = get_tpt_conversation(pinfo, TRUE);
CID 280210: Dereference null return value (NULL_RETURNS)Function
"conversation_get_proto_data" returns null (checked 115 out of 131 times). 
[show details]
Assigning: "tpt_conv_data" = null return value from 
"conversation_get_proto_data".
 538        tpt_conv_data = (jxta_stream_conversation_data *)
conversation_get_proto_data(tpt_conversation, proto_jxta);
 539
Dereferencing a null pointer "tpt_conv_data".
 540        if (0 == tpt_conv_data->initiator_welcome_frame) {

I've done some cleanup in r42932 (I hope correct), if it doesn't fix CID 280210
I'd vote to add some:
   g_asse^W DISSECTOR_ASSERT(tpt_conv_data != NULL);

;-)
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: