Ethereal-dev: Re: [Ethereal-dev] packet-pres dissector doesn't work at all afterSVN-14193.
The revision 14302 is working well.
Thank you.
From: Gerald Combs <gerald@xxxxxxxxxxxx>
Reply-To: Ethereal development <ethereal-dev@xxxxxxxxxxxx>
To: Ethereal development <ethereal-dev@xxxxxxxxxxxx>
Subject: Re: [Ethereal-dev] packet-pres dissector doesn't work at all
afterSVN-14193.
Date: Tue, 03 May 2005 13:44:55 -0500
Yuriy Sidelnikov wrote:
> Hi,
> I've found recently that presentation dissector doesn't work now.
> I guess reason is in wrong using of tvb_ensure_bytes_exist function.
> SVN-14193 has added a lot of lines looks like :
> tvb_ensure_bytes_exist(tvb, offset, -1);
> As I can see from comment in the tvb_ensure_bytes_exist function:
> /*
> * -1 doesn't mean "until end of buffer", as that's pointless
> * for this routine. We must treat it as a Really Large Positive
> * Number, so that we throw an exception; we throw
> * ReportedBoundsError, as if it were past even the end of a
> * reassembled packet, and past the end of even the data we
> * didn't capture.
> *
> * We do the same with other negative lengths.
> */
> So I don't think we can use -1 as argument for this function because -1
> will always throw exception.
> We need to use real length but sometimes it is not very easy.
I've backed out the changes. The problems the tvb_ensure_bytes_exist()
calls were supposed to fix have been addressed in proto.c. Could you
check revision 14298 or later to see if things are working correctly?
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/