aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/rlc_lte_graph.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2012-10-10 16:17:19 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2012-10-10 16:17:19 +0000
commit81a50ff80bcee4bcfaeeea8bc0e5226151a4c020 (patch)
tree2acc5fd489a7e22b31da51c67b964b1e1112489e /ui/gtk/rlc_lte_graph.c
parentd8fa6d9c9a7079017d474b4d97276ea5acf80ecb (diff)
Take a deep copy of the tap struct in the tap function, as it is not
safe to access it after the packet has been fully dissected (the struct will have been allocated with ep_alloc()). svn path=/trunk/; revision=45449
Diffstat (limited to 'ui/gtk/rlc_lte_graph.c')
-rw-r--r--ui/gtk/rlc_lte_graph.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/gtk/rlc_lte_graph.c b/ui/gtk/rlc_lte_graph.c
index 55d3ca78a6..d9f8280262 100644
--- a/ui/gtk/rlc_lte_graph.c
+++ b/ui/gtk/rlc_lte_graph.c
@@ -833,7 +833,10 @@ tap_lte_rlc_packet(void *pct, packet_info *pinfo _U_, epan_dissect_t *edt _U_, c
/* Add address if unique and have space for it */
if (is_unique && (th->num_hdrs < MAX_SUPPORTED_CHANNELS)) {
/* Copy the tap stuct in as next header */
- th->rlchdrs[th->num_hdrs] = header;
+ /* Need to take a deep copy of the tap struct, it may not be valid
+ to read after this function returns? */
+ th->rlchdrs[th->num_hdrs] = g_malloc(sizeof(rlc_lte_tap_info));
+ *(th->rlchdrs[th->num_hdrs]) = *header;
/* Store in direction of data though... */
if (th->rlchdrs[th->num_hdrs]->isControlPDU) {