aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-10-24 11:35:02 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2015-10-24 12:50:39 +0000
commit2cec957fc9e7d74c03bf4131bbc3228adc7993a6 (patch)
tree2a4be95fa65e496afaa45de2c2c66cc97d067ce1 /asn1
parent3385c2951c7dfecaaf0aad871a0842319d386321 (diff)
T38: fix a dereference of NULL pointer
Change-Id: I6d0a87e301145f43af0c0ccba44c1dbb2f84adb2 Ping-Bug: 9887 Reviewed-on: https://code.wireshark.org/review/11242 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'asn1')
-rw-r--r--asn1/t38/packet-t38-template.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/asn1/t38/packet-t38-template.c b/asn1/t38/packet-t38-template.c
index 58f943211e..eb209a1caf 100644
--- a/asn1/t38/packet-t38-template.c
+++ b/asn1/t38/packet-t38-template.c
@@ -428,7 +428,7 @@ init_t38_info_conv(packet_info *pinfo)
p_t38_conv = NULL;
/* Use existing packet info if available */
- p_t38_packet_conv = (t38_conv *)p_get_proto_data(wmem_file_scope(), pinfo, proto_t38, 0);
+ p_t38_packet_conv = (t38_conv *)p_get_proto_data(wmem_file_scope(), pinfo, proto_t38, 0);
/* find the conversation used for Reassemble and Setup Info */
@@ -445,38 +445,38 @@ init_t38_info_conv(packet_info *pinfo)
conversation_set_dissector(p_conv, t38_udp_handle);
}
- if (!p_t38_packet_conv) {
- p_t38_conv = (t38_conv *)conversation_get_proto_data(p_conv, proto_t38);
-
- /* create the conversation if it doen't exist */
- if (!p_t38_conv) {
- p_t38_conv = wmem_new(wmem_file_scope(), t38_conv);
- p_t38_conv->setup_method[0] = '\0';
- p_t38_conv->setup_frame_number = 0;
-
- p_t38_conv->src_t38_info.reass_ID = 0;
- p_t38_conv->src_t38_info.reass_start_seqnum = -1;
- p_t38_conv->src_t38_info.reass_data_type = 0;
- p_t38_conv->src_t38_info.last_seqnum = -1;
- p_t38_conv->src_t38_info.packet_lost = 0;
- p_t38_conv->src_t38_info.burst_lost = 0;
- p_t38_conv->src_t38_info.time_first_t4_data = 0;
- p_t38_conv->src_t38_info.additional_hdlc_data_field_counter = 0;
- p_t38_conv->src_t38_info.seqnum_prev_data_field = -1;
-
- p_t38_conv->dst_t38_info.reass_ID = 0;
- p_t38_conv->dst_t38_info.reass_start_seqnum = -1;
- p_t38_conv->dst_t38_info.reass_data_type = 0;
- p_t38_conv->dst_t38_info.last_seqnum = -1;
- p_t38_conv->dst_t38_info.packet_lost = 0;
- p_t38_conv->dst_t38_info.burst_lost = 0;
- p_t38_conv->dst_t38_info.time_first_t4_data = 0;
- p_t38_conv->dst_t38_info.additional_hdlc_data_field_counter = 0;
- p_t38_conv->dst_t38_info.seqnum_prev_data_field = -1;
-
- conversation_add_proto_data(p_conv, proto_t38, p_t38_conv);
- }
+ p_t38_conv = (t38_conv *)conversation_get_proto_data(p_conv, proto_t38);
+
+ /* create the conversation if it doesn't exist */
+ if (!p_t38_conv) {
+ p_t38_conv = wmem_new(wmem_file_scope(), t38_conv);
+ p_t38_conv->setup_method[0] = '\0';
+ p_t38_conv->setup_frame_number = 0;
+
+ p_t38_conv->src_t38_info.reass_ID = 0;
+ p_t38_conv->src_t38_info.reass_start_seqnum = -1;
+ p_t38_conv->src_t38_info.reass_data_type = 0;
+ p_t38_conv->src_t38_info.last_seqnum = -1;
+ p_t38_conv->src_t38_info.packet_lost = 0;
+ p_t38_conv->src_t38_info.burst_lost = 0;
+ p_t38_conv->src_t38_info.time_first_t4_data = 0;
+ p_t38_conv->src_t38_info.additional_hdlc_data_field_counter = 0;
+ p_t38_conv->src_t38_info.seqnum_prev_data_field = -1;
+
+ p_t38_conv->dst_t38_info.reass_ID = 0;
+ p_t38_conv->dst_t38_info.reass_start_seqnum = -1;
+ p_t38_conv->dst_t38_info.reass_data_type = 0;
+ p_t38_conv->dst_t38_info.last_seqnum = -1;
+ p_t38_conv->dst_t38_info.packet_lost = 0;
+ p_t38_conv->dst_t38_info.burst_lost = 0;
+ p_t38_conv->dst_t38_info.time_first_t4_data = 0;
+ p_t38_conv->dst_t38_info.additional_hdlc_data_field_counter = 0;
+ p_t38_conv->dst_t38_info.seqnum_prev_data_field = -1;
+
+ conversation_add_proto_data(p_conv, proto_t38, p_t38_conv);
+ }
+ if (!p_t38_packet_conv) {
/* copy the t38 conversation info to the packet t38 conversation */
p_t38_packet_conv = wmem_new(wmem_file_scope(), t38_conv);
g_strlcpy(p_t38_packet_conv->setup_method, p_t38_conv->setup_method, MAX_T38_SETUP_METHOD_SIZE);