/* XXX - should map invalid UTF-8 sequences to UNREPL.  */
static guint8* tvb_get_utf_8_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, const gint length)
/* XXX - should map invalid UTF-8 sequences to UNREPL.  */
static guint8* tvb_get_utf_8_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, const gint length)
{
	guint8 *strbuf;
	tvb_ensure_bytes_exist(tvb, offset, length);
	strbuf = (guint8 *)wmem_alloc(scope, length + 1);
	tvb_memcpy(tvb, strbuf, offset, length);
	strbuf[length] = '\0';
	return strbuf;
}