Ethereal-dev: Re: [Ethereal-dev] 2 patches to packet-gtp.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Mon, 11 Nov 2002 09:50:06 -0800
On Mon, Nov 11, 2002 at 10:53:35AM +0100, Trauer Andreas wrote:
> 2)
>        I've tried to create a better display for the octet swapping problem 
>        in the protocol configuration options.
> 
>        After the decoding of the PPP part I've undone the swapping,

The swapping should've been done that way in the first place;
"tvb_get_ptr" returns a "const" pointer for a reason - *NO* dissector is
*EVER* supposed to modify the data in a tvbuff handed to it.  (We do not
guarantee that it will always be the case that the buffer will be
read-write.)

Instead, a new tvbuff should be constructed, with new data, and that
data modified.