Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] how to handle dissecting length encoded strings

From: Fulko Hew <fulko.hew@xxxxxxxxx>
Date: Mon, 14 Mar 2011 12:34:34 -0400
On Mon, Mar 14, 2011 at 12:17 PM, Chris Maynard <chris.maynard@xxxxxxxxx> wrote:
> Chris Maynard <chris.maynard@...> writes:
>
> Oops, I guess you still need to NULL-terminate context if n_oct is 0

The trouble is that tvb_get_nstringz0() calls tvb_get_nstringz() under
the covers
and its tvb_get_nstringz()  that has the issue.  It expects to be
given a null terminated
string, not a length specified string.

BTW. I tried tvb_get_ephemeral_string() and it seemed to do the trick.