Wireshark-bugs: [Wireshark-bugs] [Bug 2746] STUN, STUN2 and TURN dissection enhancements

Date: Mon, 28 Jul 2008 08:53:23 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2746





--- Comment #1 from Jaap Keuter <jaap.keuter@xxxxxxxxx>  2008-07-28 08:53:22 PDT ---
Not all value_string arrays end in a {0, NULL} tuple.

+           return (int)is_stun2;
You know is_stun2 is FALSE, so return 0.

+         if ((conversation = 
+              find_conversation(pinfo->fd->num, 
+                                &pinfo->src, &pinfo->dst,
+                                pinfo->ptype, 
+                                pinfo->srcport, pinfo->destport, 0)) &&
+             (stun2_info = 
+              conversation_get_proto_data(conversation, proto_stun2)) &&
+             (stun2_info->turnchannel_pdus) &&
+             (turn_channel = se_tree_lookup32(stun2_info->turnchannel_pdus,
+                                              (guint32)msg_type)))
This is not the way to define execution order. Only the first part of the
conditional is guaranteed to be evaluated before the rest.

+       transaction_id_key[0].length = 1;
+       transaction_id_key[0].key =  &(transaction_id[0]);
+       transaction_id_key[1]  .....
+       transaction_id_key[3].length = 0;
+       transaction_id_key[3].key =  NULL;
Why not specify the transaction_id_key like this:
+       transaction_id_key[0].length = 3;
+       transaction_id_key[0].key = transaction_id;
+       transaction_id_key[1].length = 0;
+       transaction_id_key[1].key =  NULL;


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