Ethereal-dev: Re: [Ethereal-dev] [patch] Fix for tvb_uncompress/http content-encoding: gzip

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

From: Jerry Talkington <[email protected]>
Date: Fri, 30 Jul 2004 17:17:59 -0700
On Fri, Jul 30, 2004 at 03:30:23PM -0700, Kelly Byrd wrote:
> This is a patch for epan/tvbuff.c
> tvb_uncompress didn't parse the gzip header flags correctly.
> When looking to see if bit 3 (bit 0 being least significant),
> was set, the checked in code does:
> if (flag & 0x3) {
> instead of something like:
> if (flag & (1 << 0x3))  {
> This was causing gzip encoded packets to not be uncompressed
> for me.
> My diff does bit shifting, obviously there are other ways to
> do this. If someone else has a stong preference for another
> form of bit masking, like (flag & 0x8), they are welcome to
> substitue that for mine.

I didn't have captures to test this against, so it doesn't suprise me at
all if it didn't work.  Would you mind sending me a sample capture
offlist?  I'd like to actually show those those fields, but I haven't
had any traces to try it on ;)