Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] malformed packet for no reason

From: Dirk Jagdmann <doj@xxxxxxxxx>
Date: Mon, 21 Mar 2011 19:18:46 -0700
I guess the packet you are trying to dissect is shorter than your two loops over
i and j assume. In your inner loop you do something like:

*plen += data_size;

So plen will be greater than num_of_data_arrs*num_of_data_chunks*data_size
bytes. Then you do a

val_ptr = tvb_get_ptr(tvb, *plen, data_size);

But tvb_get_ptr() can return NULL when out of bounds of the current packet. I
guess this condition is reached on your 6th iteration.

-- 
---> Dirk Jagdmann
----> http://cubic.org/~doj
-----> http://llg.cubic.org