Ethereal-dev: Re: [Ethereal-dev] problem in packet-tns

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

From: Gilbert Ramirez <gram@xxxxxxxxxxxxxxx>
Date: Thu, 31 Jan 2002 13:32:05 -0600
On Thu, 31 Jan 2002 13:22:47 "Neulinger, Nathan" wrote:
> > 
> > If your string (hf_tns_connect_data) really is supposed to continue to
> > the end of the tvbuff, but the tvbuff has no more data, then an
> > exception needs to be thrown. The question becomes, should we
> > have a version of tvb_length_remaining() that can throw
> > an exception, or should the dissector check the return value of
> > tvb_length_remaining() and throw the exception. Probably the former.
> > 
> > Do you concur?
> 
> Seems to make sense to me... Wonder why that is occurring though.
> 
> This is used in a bunch of places in the tns dissector - the offset in frame to certain data is a field in the frame. Odd that it either is dissecting incorrectly, or that something is wrong with the frame data. Will have to look into it a bit further. 
> 

In addition, many dissectors make use of tvb_length_remaining().
By looking at some of the usages where the return-value of
that function is passed directly to proto_tree_add_*(), there's more
places where the assert could be triggered.

--gilbert