Wireshark mailing list archives

Re: tvb_get_string_enc() doesn't always return valid UTF-8


From: Martin Kaiser <lists () kaiser cx>
Date: Mon, 20 Jan 2014 22:49:35 +0100

Thus wrote Evan Huus (eapache () gmail com):

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
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: