Wireshark mailing list archives

wireshark assertion issue


From: "Rach, Darshan" <DarshanR () nds com>
Date: Mon, 23 Nov 2009 12:50:16 +0530

Hi,

I have written a plugin to parse a new protocol called DASH in wireshark.
For packets which are fragmented, I have the following piece of code:

/* Multiple packets in response - last_packet_flag field is the last packet flag */
if(((block_number == 0) && (last_packet_flag == 0)) ||(block_number > 0))
{
                pkt->fragmented = TRUE;

                frag_msg = fragment_add_seq_check(tvb, packet_field_offset, pkt,
                                                                                  msgid, /* ID for fragments belonging 
together */
                                                                                  msg_fragment_table, /* list of 
message fragments */
                                                                                  msg_reassembled_table, /* list of 
reassembled messages */
                                                                                  block_number, /* fragment sequence 
number */
                                                                                  tvb_length_remaining(tvb, 
packet_field_offset), /* fragment length - to the end */
                                                                                  last_packet_flag); /* More fragments? 
*/

                new_tvb = process_reassembled_data(tvb, packet_field_offset, pkt,
                                                                                   "Reassembled OQTP Message",
                                                                                   frag_msg,
                                                                                   &msg_frag_items,
                                                                                   NULL,
                                                                                   oqtp_tree);

                /* Reassembled */
                if (frag_msg)
                {
                                col_append_str(pkt->cinfo, COL_INFO,
                                                                                   "(Reassembled OQTP Response)");
                }
                else
                {
                                /* Not last packet of reassembled short message */
                                col_append_fstr(pkt->cinfo, COL_INFO,
                                                                                    "(OQTP fragment %u)", block_number);
                }

                if (new_tvb) /* take it all */
                {
                                next_tvb = new_tvb;
                }
                else
                {
                                /* make a new subset */
                                next_tvb = tvb_new_subset(tvb, packet_field_offset, -1, -1);
                }
}

Doing this way, I am getting a DISSECTOR BUG.

[cid:image001.jpg@01CA6C3B.7C206AD0]

Kindly help what might have gone wrong?

Regards,
Darshan


________________________________
This message is confidential and intended only for the addressee. If you have received this message in error, please 
immediately notify the postmaster () nds com and delete it from your system as well as any copies. The content of 
e-mails as well as traffic data may be monitored by NDS for employment and security purposes.
To protect the environment please do not print this e-mail unless necessary.

An NDS Group Limited company. www.nds.com

___________________________________________________________________________
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: