aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2018-12-06 09:57:55 +0100
committerAnders Broman <a.broman58@gmail.com>2018-12-06 09:52:34 +0000
commitf9484445316f0a7c176e749408d6799cd6249497 (patch)
tree472fea90827bb41dfda5a38caf9cba992c5b472f
parent7805221e4a104a73867a28cf6a51c7270831c9b3 (diff)
SIP: Try to fix ASAN build crash.
Bug: 15328 Change-Id: Iefc057c74f234592adca1f7816a3e9fac99b48be Reviewed-on: https://code.wireshark.org/review/30937 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/dissectors/packet-sip.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c
index b69c61f0e6..fbec8f45e3 100644
--- a/epan/dissectors/packet-sip.c
+++ b/epan/dissectors/packet-sip.c
@@ -4668,6 +4668,14 @@ dissect_sip_common(tvbuff_t *tvb, int offset, int remaining_length, packet_info
* There's a message body starting at "offset".
* Set the length of the header item.
*/
+ sdp_setup_info_t setup_info;
+
+ setup_info.setup_proto = g_strdup("SIP");
+ setup_info.hf_id = hf_sip_call_id_gen;
+ setup_info.hf_type = SDP_TRACE_ID_HF_TYPE_STR;
+ setup_info.trace_id = g_strdup(call_id);
+ message_info.data = &setup_info;
+
proto_item_set_end(th, tvb, offset);
if(content_encoding_parameter_str != NULL &&
(!strncmp(content_encoding_parameter_str, "gzip", 4) ||
@@ -4704,14 +4712,6 @@ dissect_sip_common(tvbuff_t *tvb, int offset, int remaining_length, packet_info
if (!strcmp(media_type_str_lower_case, "application/sdp")) {
/* Resends don't count */
if (resend_for_packet == 0) {
- sdp_setup_info_t setup_info;
-
- setup_info.setup_proto = g_strdup("SIP");
- setup_info.hf_id = hf_sip_call_id_gen;
- setup_info.hf_type = SDP_TRACE_ID_HF_TYPE_STR;
- setup_info.trace_id = g_strdup(call_id);
- message_info.data = &setup_info;
-
if (line_type == REQUEST_LINE) {
DPRINT(("calling setup_sdp_transport() SDP_EXCHANGE_OFFER frame=%d",
pinfo->num));