Wireshark mailing list archives
Re: ep_alloc overused?
From: Jakub Zawadzki <darkjames () darkjames ath cx>
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? ___________________________________________________________________________ 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:
- ep_alloc overused? Jakub Zawadzki (Oct 24)
- Re: ep_alloc overused? Guy Harris (Oct 24)
- Re: ep_alloc overused? Jakub Zawadzki (Oct 25)
- Re: ep_alloc overused? Jakub Zawadzki (Oct 25)
- Re: ep_alloc overused? Guy Harris (Oct 24)