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] tvb_get_string_enc() doesn't always return valid UTF-8

From: Martin Kaiser <lists@xxxxxxxxx>
Date: Mon, 20 Jan 2014 22:49:35 +0100
Thus wrote Evan Huus (eapache@xxxxxxxxx):

> I think we'd agreed that the right thing to do is to convert most of
> our string functions to handle and return counted strings
> (wmem_strbuf_t or something) and then do the replacement as you
> suggest. There are several other outstanding encoding issues
> (especially around embedded NULLs) where string length cannot be
> reliably managed without explicitly counting it.

> Unfortunately it's a relatively large API change, but I think it's the
> right thing going forward, especially since we already use a
> wmem_strbuf_t in most of the _get_string functions already (we just
> don't return it).

Ok, that means my idea does not conflict with your long-term plans.

I committed the change to tvb_get_string() in r54864. I'll have a look
at tvb_get_stringz() tomorrow.

   Martin