Wireshark-dev: Re: [Wireshark-dev] pcapng, must opt_comment string be 0-terminated?
From: Chris Maynard <Chris.Maynard@xxxxxxxxx>
Date: Thu, 5 Jan 2012 21:22:00 +0000 (UTC)
Michael Tuexen <Michael.Tuexen@...> writes:

> On Jan 2, 2012, at 3:53 AM, Guy Harris wrote:
> > I'll send the spec maintainers a note asking about this, and suggesting that
the spec indicate that all
> strings are counted (but shouldn't contain a null byte).
> Hmm, I wouldn't mind if they are 0-terminiated, I even thought they are.
However, it would be great
> if it would be described explicitly in the spec.

In section 3.6[1], there is specific mention of the dns entries being
zero-terminated in Table 2.  While not part of the options[2] section, it could
lead one to believe that other strings should be zero-terminated as well. 
Should the mention of the dns entries being zero-terminated be changed as well?

And although the strings are counted, should that necessarily mean that strings
shouldn't be null-terminated, or only that they need not be null-terminated?

[1]: http://www.winpcap.org/ntar/draft/PCAP-DumpFileFormat.html#sectionnrb
[2]: http://www.winpcap.org/ntar/draft/PCAP-DumpFileFormat.html#sectionopt