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] ep_alloc overused?

From: Jakub Zawadzki <darkjames@xxxxxxxxxxxxxxxx>
Date: Sun, 25 Oct 2009 13:30:40 +0100
More questions :)

What about:

(dissectors/packet-armagetronad.c)
        data = tvb_memcpy(tvb, ep_alloc(data_len + 1), offset, data_len);
        data[data_len] = '\0';

It looks like: data = tvb_get_ephemeral_string(tvb, offset, data_len)

But tvb_memcpy() has some code to handle TVBUFF_SUBSET/TVBUFF_COMPOSITE,
which tvb_get_ephemeral_string() can't handle.

... and ...

(dissectors/packet-t30.c)
	t4_data = ep_alloc(len-1);
	tvb_memcpy(tvb, t4_data, offset, len-1);

This is like: t4_data = ep_tvb_memdup(tvb, offset, len-1);

But ep_tvb_memdup() has some more extra overhead.
It's ok to don't care about it?