Ethereal-dev: Re: [ethereal-dev] IIOP dissector

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

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Sat, 26 Aug 2000 19:24:33 -0700
On Fri, Aug 25, 2000 at 02:57:25PM -0400, Gilbert Ramirez wrote:
> > What does FT_STRINGZ do if no NUL is found by the time the maximum
> > length is reached?  I suspect it should act as if there were a NUL right
> > after the maximum length, i.e. copy the maximum length of bytes worth of
> > string data into the buffer allocated for the protocol tree item, and
> > then stick a NUL after it in that buffer, as some protocols have string
> > fields that take up a fixed amount of space in the packet, but that are
> > NUL-*padded* rather than NUL-*terminated*.
> 
> Good question. Last night I couldn't decide between the above behavior
> and reporting (in the proto_tree) an error. But because of the
> NUL-padded situations, I agree with the above proposal.

Note that there are, I think, both NUL-padded strings with a specified
maximum length and NUL-terminated strings with no specified maximum
length; I've seen the former in some protocols, and the latter, I think,
appear in SMB.