diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-10-24 11:35:02 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-10-24 12:40:06 +0000 |
commit | eb6ccb1b0c4ad02b828652c3fe6e8d51c30a315e (patch) | |
tree | 9898d87f5d8a65b801f3bc906f45ba0bb32eaed9 /asn1 | |
parent | 9d02d9f07a04b68a71d305288c6007716439f32d (diff) | |
download | wireshark-eb6ccb1b0c4ad02b828652c3fe6e8d51c30a315e.tar.gz wireshark-eb6ccb1b0c4ad02b828652c3fe6e8d51c30a315e.tar.bz2 wireshark-eb6ccb1b0c4ad02b828652c3fe6e8d51c30a315e.zip |
T38: fix a dereference of NULL pointer
Change-Id: I6d0a87e301145f43af0c0ccba44c1dbb2f84adb2
Ping-Bug: 9887
Reviewed-on: https://code.wireshark.org/review/11243
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/t38/packet-t38-template.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/asn1/t38/packet-t38-template.c b/asn1/t38/packet-t38-template.c index 88cc0992d4..e61ce2e439 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); |