diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2011-05-20 03:22:27 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2011-05-20 03:22:27 +0000 |
commit | bcd55c173bfdccee7248e34218115935b2cdddba (patch) | |
tree | 2f5ddb803e23e1764ff8053c657b5f26c721b3e8 /epan/dissectors/packet-rmt-lct.c | |
parent | 11ac49f225cfbb8255d5057a95a3aaeb21a19c1f (diff) |
Copy data from the TVB into ep_alloc'd memory, rather than saving a pointer into the TVB.
svn path=/trunk/; revision=37323
Diffstat (limited to 'epan/dissectors/packet-rmt-lct.c')
-rw-r--r-- | epan/dissectors/packet-rmt-lct.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-rmt-lct.c b/epan/dissectors/packet-rmt-lct.c index 931e53f944..ea27477d69 100644 --- a/epan/dissectors/packet-rmt-lct.c +++ b/epan/dissectors/packet-rmt-lct.c @@ -261,6 +261,7 @@ gboolean lct_dissector(struct _lct_ptr l, struct _fec_ptr f, tvbuff_t *tvb, prot guint16 buffer16; gboolean is_flute_tmp =FALSE; gboolean is_flute =FALSE; + guint8 *tmp; /* Set up structures needed to add the protocol subtree and manage it */ proto_item *ti; @@ -410,7 +411,9 @@ gboolean lct_dissector(struct _lct_ptr l, struct _fec_ptr f, tvbuff_t *tvb, prot break; } - l.lct->toi_extended = tvb_get_ptr(tvb, *offset, l.lct->toi_size); + tmp = ep_alloc(l.lct->toi_size); + tvb_memcpy(tvb, tmp, *offset, l.lct->toi_size); + l.lct->toi_extended = tmp; if (tree) { @@ -419,7 +422,7 @@ gboolean lct_dissector(struct _lct_ptr l, struct _fec_ptr f, tvbuff_t *tvb, prot else proto_tree_add_uint64(lct_tree, l.hf->toi, tvb, *offset, l.lct->toi_size, l.lct->toi); - proto_tree_add_bytes(lct_tree, l.hf->toi_extended, tvb, *offset, l.lct->toi_size, l.lct->toi_extended); + proto_tree_add_item(lct_tree, l.hf->toi_extended, tvb, *offset, l.lct->toi_size, ENC_NA); } *offset += l.lct->toi_size; |