diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2014-12-21 20:56:33 +0100 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2014-12-21 20:47:48 +0000 |
commit | 9407160e05ab8031014b1a7db9488b3f0f7e041b (patch) | |
tree | 9e9d08f52d888f07435f0bccd173c69512f74f64 /ui/gtk | |
parent | ccf0573fcd24f26f757521d31ca96256869f9ec2 (diff) | |
download | wireshark-9407160e05ab8031014b1a7db9488b3f0f7e041b.tar.gz |
Do not use packet scoped memory in GUI
It will trigger an assertion
Change-Id: I2436c11b45e1505a94256a06ed3ad0c5480e034b
Reviewed-on: https://code.wireshark.org/review/5953
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'ui/gtk')
-rw-r--r-- | ui/gtk/lbm_stream_dlg.c | 8 | ||||
-rw-r--r-- | ui/gtk/lbm_uimflow_dlg.c | 4 | ||||
-rw-r--r-- | ui/gtk/rtp_stream_dlg.c | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/ui/gtk/lbm_stream_dlg.c b/ui/gtk/lbm_stream_dlg.c index 475183ebd7..b3266ec6d5 100644 --- a/ui/gtk/lbm_stream_dlg.c +++ b/ui/gtk/lbm_stream_dlg.c @@ -97,10 +97,10 @@ static gchar * lbmc_stream_dlg_format_endpoint_ep(const lbm_uim_stream_endpoint_ } else { - buf = wmem_strdup_printf(wmem_packet_scope(), + buf = ep_strdup_printf( "%" G_GUINT32_FORMAT ":%s:%" G_GUINT16_FORMAT, endpoint->stream_info.dest.domain, - address_to_str(wmem_packet_scope(), &(endpoint->stream_info.dest.addr)), + ep_address_to_str(&(endpoint->stream_info.dest.addr)), endpoint->stream_info.dest.port); } return (buf); @@ -672,8 +672,8 @@ static gboolean lbmc_stream_dlg_tap_packet(void * tap_data, packet_info * pinfo, substream = (lbmc_stream_dlg_substream_entry_t *)g_malloc(sizeof(lbmc_stream_dlg_substream_entry_t)); substream->substream_id = tapinfo->substream_id; - substream->endpoint_a = wmem_strdup_printf(wmem_file_scope(), "%s:%" G_GUINT16_FORMAT, address_to_str(wmem_packet_scope(), &(pinfo->src)), (guint16)pinfo->srcport); - substream->endpoint_b = wmem_strdup_printf(wmem_file_scope(), "%s:%" G_GUINT16_FORMAT, address_to_str(wmem_packet_scope(), &(pinfo->dst)), (guint16)pinfo->destport); + substream->endpoint_a = wmem_strdup_printf(wmem_file_scope(), "%s:%" G_GUINT16_FORMAT, ep_address_to_str(&(pinfo->src)), (guint16)pinfo->srcport); + substream->endpoint_b = wmem_strdup_printf(wmem_file_scope(), "%s:%" G_GUINT16_FORMAT, ep_address_to_str(&(pinfo->dst)), (guint16)pinfo->destport); substream->first_frame = (guint32)(~0); substream->last_frame = 0; substream->messages = 0; diff --git a/ui/gtk/lbm_uimflow_dlg.c b/ui/gtk/lbm_uimflow_dlg.c index a2f17ec722..bdb141e4d0 100644 --- a/ui/gtk/lbm_uimflow_dlg.c +++ b/ui/gtk/lbm_uimflow_dlg.c @@ -194,10 +194,10 @@ static int lbmc_uim_flow_graph_add_to_graph(packet_info * pinfo, const lbm_uim_s { item->comment = g_strdup_printf("%" G_GUINT32_FORMAT ":%s:%" G_GUINT16_FORMAT " <-> %" G_GUINT32_FORMAT ":%s:%" G_GUINT16_FORMAT " [%" G_GUINT64_FORMAT "]", epa.stream_info.dest.domain, - address_to_str(wmem_packet_scope(), &(epa.stream_info.dest.addr)), + ep_address_to_str(&(epa.stream_info.dest.addr)), epa.stream_info.dest.port, epb.stream_info.dest.domain, - address_to_str(wmem_packet_scope(), &(epb.stream_info.dest.addr)), + ep_address_to_str(&(epb.stream_info.dest.addr)), epb.stream_info.dest.port, stream_info->channel); } diff --git a/ui/gtk/rtp_stream_dlg.c b/ui/gtk/rtp_stream_dlg.c index 002eff471b..3b47b87eae 100644 --- a/ui/gtk/rtp_stream_dlg.c +++ b/ui/gtk/rtp_stream_dlg.c @@ -400,10 +400,10 @@ rtpstream_on_filter(GtkButton *button _U_, gpointer user_data _U_) filter_string_fwd = g_strdup_printf( "(ip%s.src==%s && udp.srcport==%u && ip%s.dst==%s && udp.dstport==%u && rtp.ssrc==0x%X)", ip_version, - address_to_str(wmem_packet_scope(), &(selected_stream_fwd->src_addr)), + ep_address_to_str(&(selected_stream_fwd->src_addr)), selected_stream_fwd->src_port, ip_version, - address_to_str(wmem_packet_scope(), &(selected_stream_fwd->dest_addr)), + ep_address_to_str(&(selected_stream_fwd->dest_addr)), selected_stream_fwd->dest_port, selected_stream_fwd->ssrc); @@ -420,10 +420,10 @@ rtpstream_on_filter(GtkButton *button _U_, gpointer user_data _U_) filter_string_rev = g_strdup_printf( "(ip%s.src==%s && udp.srcport==%u && ip%s.dst==%s && udp.dstport==%u && rtp.ssrc==0x%X)", ip_version, - address_to_str(wmem_packet_scope(), &(selected_stream_rev->src_addr)), + ep_address_to_str(&(selected_stream_rev->src_addr)), selected_stream_rev->src_port, ip_version, - address_to_str(wmem_packet_scope(), &(selected_stream_rev->dest_addr)), + ep_address_to_str(&(selected_stream_rev->dest_addr)), selected_stream_rev->dest_port, selected_stream_rev->ssrc); |