diff options
author | AndersBroman <anders.broman@ericsson.com> | 2014-03-31 14:35:05 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-03-31 15:51:27 +0000 |
commit | b3708a9c4a5917bec6f42754fded0bb33fbe0d74 (patch) | |
tree | cb7e8742aa5935f7a85697b27f9ba2b22d6325b9 /epan | |
parent | 6a3394eefa14e40b5b6310395117e9d4adfe6f8f (diff) |
According to RFC 3261
7 SIP Messages
SIP is a text-based protocol and uses the UTF-8 charset
So use ENC_UTF_8|ENC_NA.
Change-Id: I0101eca3dd7d8ff9ebf98fd733548131b862919e
Reviewed-on: https://code.wireshark.org/review/890
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-sip.c | 101 |
1 files changed, 51 insertions, 50 deletions
diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c index 1a86b38c6e..4075dd338b 100644 --- a/epan/dissectors/packet-sip.c +++ b/epan/dissectors/packet-sip.c @@ -1455,24 +1455,24 @@ display_sip_uri (tvbuff_t *tvb, proto_tree *sip_element_tree, uri_offset_info* u if(uri_offsets->display_name_end != uri_offsets->display_name_start) { proto_tree_add_item(sip_element_tree, hf_sip_display, tvb, uri_offsets->display_name_start, - uri_offsets->display_name_end - uri_offsets->display_name_start + 1, ENC_ASCII|ENC_NA); + uri_offsets->display_name_end - uri_offsets->display_name_start + 1, ENC_UTF_8|ENC_NA); } ti = proto_tree_add_item(sip_element_tree, *(uri->hf_sip_addr), - tvb, uri_offsets->uri_start, uri_offsets->uri_end - uri_offsets->uri_start + 1, ENC_ASCII|ENC_NA); + tvb, uri_offsets->uri_start, uri_offsets->uri_end - uri_offsets->uri_start + 1, ENC_UTF_8|ENC_NA); uri_item_tree = proto_item_add_subtree(ti, *(uri->ett_uri)); if(uri_offsets->uri_user_end > uri_offsets->uri_user_start) { proto_tree_add_item(uri_item_tree, *(uri->hf_sip_user), tvb, uri_offsets->uri_user_start, - uri_offsets->uri_user_end - uri_offsets->uri_user_start + 1, ENC_ASCII|ENC_NA); + uri_offsets->uri_user_end - uri_offsets->uri_user_start + 1, ENC_UTF_8|ENC_NA); } proto_tree_add_item(uri_item_tree, *(uri->hf_sip_host), tvb, uri_offsets->uri_host_start, - uri_offsets->uri_host_end - uri_offsets->uri_host_start + 1, ENC_ASCII|ENC_NA); + uri_offsets->uri_host_end - uri_offsets->uri_host_start + 1, ENC_UTF_8|ENC_NA); if(uri_offsets->uri_host_port_end > uri_offsets->uri_host_port_start) { proto_tree_add_item(uri_item_tree, *(uri->hf_sip_port), tvb, uri_offsets->uri_host_port_start, - uri_offsets->uri_host_port_end - uri_offsets->uri_host_port_start + 1, ENC_ASCII|ENC_NA); + uri_offsets->uri_host_port_end - uri_offsets->uri_host_port_start + 1, ENC_UTF_8|ENC_NA); } if (uri_offsets->uri_parameters_start != -1) { @@ -1509,7 +1509,7 @@ display_sip_uri (tvbuff_t *tvb, proto_tree *sip_element_tree, uri_offset_info* u } proto_tree_add_item(uri_item_tree, *(uri->hf_sip_param), tvb, uri_params_start_offset , - uri_param_end_offset - uri_params_start_offset +1, ENC_ASCII|ENC_NA); + uri_param_end_offset - uri_params_start_offset +1, ENC_UTF_8|ENC_NA); /* In case there are more parameters, point to the start of it */ uri_params_start_offset = current_offset; @@ -1626,7 +1626,7 @@ dissect_sip_contact_item(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gi current_offset = queried_offset; } proto_tree_add_item(tree, hf_sip_contact_param, tvb, contact_params_start_offset , - current_offset - contact_params_start_offset, ENC_ASCII|ENC_NA); + current_offset - contact_params_start_offset, ENC_UTF_8|ENC_NA); /* need to check for an 'expires' parameter * TODO: this should be done in a common way for all headers, @@ -1642,7 +1642,7 @@ dissect_sip_contact_item(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gi * so that's ok */ if (atoi(tvb_get_string_enc(wmem_packet_scope(), tvb, contact_params_start_offset+8, - current_offset - (contact_params_start_offset+8), ENC_UTF_8)) == 0) { + current_offset - (contact_params_start_offset+8), ENC_UTF_8|ENC_NA)) == 0) { (*contacts_expires_0)++; /* it is actually unusual - arguably invalid - for a SIP REGISTER * 200 OK _response_ to contain Contacts with expires=0. @@ -1712,7 +1712,7 @@ dissect_sip_authorization_item(tvbuff_t *tvb, proto_tree *tree, gint start_offse par_name_end_offset = tvb_skip_wsp_return(tvb,par_name_end_offset); /* Extract the parameter name */ - name = tvb_get_string_enc(wmem_packet_scope(), tvb, start_offset, par_name_end_offset-start_offset, ENC_UTF_8); + name = tvb_get_string_enc(wmem_packet_scope(), tvb, start_offset, par_name_end_offset-start_offset, ENC_UTF_8|ENC_NA); /* Find end of parameter, it can be a quoted string so check for quoutes too */ queried_offset = par_name_end_offset; @@ -1758,7 +1758,7 @@ found: { proto_tree_add_item(tree, *(auth_parameter->hf_item), tvb, equals_offset+1, current_offset-equals_offset-1, - ENC_ASCII|ENC_NA); + ENC_UTF_8|ENC_NA); break; } } @@ -1801,13 +1801,13 @@ dissect_sip_reason_header(tvbuff_t *tvb, proto_tree *tree, gint start_offset, gi proto_tree_add_text(tree, tvb, start_offset, length, "Reason Protocols: %s", tvb_format_text(tvb, start_offset, length)); - param_name = tvb_get_string_enc(wmem_packet_scope(), tvb, start_offset, length, ENC_UTF_8); + param_name = tvb_get_string_enc(wmem_packet_scope(), tvb, start_offset, length, ENC_UTF_8|ENC_NA); if (g_ascii_strcasecmp(param_name, "Q.850") == 0){ current_offset = tvb_find_guint8(tvb, semi_colon_offset, line_end_offset-semi_colon_offset, '=')+1; length = line_end_offset - current_offset; /* q850_cause_code_vals */ - cause_value = (guint)strtoul(tvb_get_string_enc(wmem_packet_scope(), tvb, current_offset, length, ENC_UTF_8), NULL, 10); + cause_value = (guint)strtoul(tvb_get_string_enc(wmem_packet_scope(), tvb, current_offset, length, ENC_UTF_8|ENC_NA), NULL, 10); proto_tree_add_text(tree, tvb, current_offset, length, "Cause: %u(0x%x)[%s]", cause_value,cause_value, val_to_str_ext(cause_value, &q850_cause_code_vals_ext, "Unknown (%d)" )); @@ -1855,7 +1855,7 @@ dissect_sip_sec_mechanism(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, g length = semi_colon_offset-current_offset; proto_tree_add_item(tree, hf_sip_sec_mechanism, tvb, start_offset, length, - ENC_ASCII|ENC_NA); + ENC_UTF_8|ENC_NA); current_offset = current_offset + length + 1; @@ -1877,9 +1877,9 @@ dissect_sip_sec_mechanism(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, g /* Has value part */ par_name_end_offset = equals_offset; /* Extract the parameter name */ - param_name = tvb_get_string_enc(wmem_packet_scope(), tvb, current_offset, par_name_end_offset-current_offset, ENC_UTF_8); + param_name = tvb_get_string_enc(wmem_packet_scope(), tvb, current_offset, par_name_end_offset-current_offset, ENC_UTF_8|ENC_NA); /* Extract the value */ - value = tvb_get_string(wmem_packet_scope(), tvb, equals_offset+1, semi_colon_offset-equals_offset+1); + value = tvb_get_string_enc(wmem_packet_scope(), tvb, equals_offset+1, semi_colon_offset-equals_offset+1, ENC_UTF_8|ENC_NA); } @@ -1888,17 +1888,17 @@ dissect_sip_sec_mechanism(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, g if (g_ascii_strcasecmp(param_name, "alg") == 0){ proto_tree_add_item(tree, hf_sip_sec_mechanism_alg, tvb, equals_offset+1, semi_colon_offset-equals_offset-1, - ENC_ASCII|ENC_NA); + ENC_UTF_8|ENC_NA); }else if (g_ascii_strcasecmp(param_name, "ealg") == 0){ proto_tree_add_item(tree, hf_sip_sec_mechanism_ealg, tvb, equals_offset+1, semi_colon_offset-equals_offset-1, - ENC_ASCII|ENC_NA); + ENC_UTF_8|ENC_NA); }else if (g_ascii_strcasecmp(param_name, "prot") == 0){ proto_tree_add_item(tree, hf_sip_sec_mechanism_prot, tvb, equals_offset+1, semi_colon_offset-equals_offset-1, - ENC_ASCII|ENC_NA); + ENC_UTF_8|ENC_NA); }else if (g_ascii_strcasecmp(param_name, "spi-c") == 0){ if (!value) { @@ -2029,7 +2029,7 @@ static void dissect_sip_via_header(tvbuff_t *tvb, proto_tree *tree, gint start_o if (transport_name_started && ((c == ' ') || (c == '\t'))) { proto_tree_add_item(tree, hf_sip_via_transport, tvb, transport_start_offset, - current_offset - transport_start_offset, ENC_ASCII|ENC_NA); + current_offset - transport_start_offset, ENC_UTF_8|ENC_NA); break; } @@ -2065,10 +2065,10 @@ static void dissect_sip_via_header(tvbuff_t *tvb, proto_tree *tree, gint start_o /* Add address to tree */ if (ipv6_address == TRUE) { proto_tree_add_item(tree, hf_sip_via_sent_by_address, tvb, address_start_offset + 1, - current_offset - address_start_offset - 2, ENC_ASCII|ENC_NA); + current_offset - address_start_offset - 2, ENC_UTF_8|ENC_NA); } else { proto_tree_add_item(tree, hf_sip_via_sent_by_address, tvb, address_start_offset, - current_offset - address_start_offset, ENC_ASCII|ENC_NA); + current_offset - address_start_offset, ENC_UTF_8|ENC_NA); } /* Transport port number may follow ([space] : [space])*/ @@ -2097,7 +2097,7 @@ static void dissect_sip_via_header(tvbuff_t *tvb, proto_tree *tree, gint start_o { /* Add address port number to tree */ int port = atoi(tvb_get_string_enc(wmem_packet_scope(), tvb, port_offset, - current_offset - port_offset, ENC_UTF_8)); + current_offset - port_offset, ENC_UTF_8|ENC_NA)); proto_tree_add_uint(tree, hf_sip_via_sent_by_port, tvb, port_offset, current_offset - port_offset, port); } @@ -2186,7 +2186,7 @@ static void dissect_sip_via_header(tvbuff_t *tvb, proto_tree *tree, gint start_o /* Note parameter name */ param_name = tvb_get_string_enc(wmem_packet_scope(), tvb, semicolon_offset+1, - parameter_name_end - semicolon_offset - 1, ENC_UTF_8); + parameter_name_end - semicolon_offset - 1, ENC_UTF_8|ENC_NA); /* Try to add parameter as a filterable item */ for (via_parameter = &via_parameters_hf_array[i]; @@ -2199,13 +2199,13 @@ static void dissect_sip_via_header(tvbuff_t *tvb, proto_tree *tree, gint start_o { proto_tree_add_item(tree, *(via_parameter->hf_item), tvb, parameter_name_end+1, current_offset-parameter_name_end-1, - ENC_ASCII|ENC_NA); + ENC_UTF_8|ENC_NA); } else { proto_tree_add_item(tree, *(via_parameter->hf_item), tvb, semicolon_offset+1, current_offset-semicolon_offset-1, - ENC_ASCII|ENC_NA); + ENC_UTF_8|ENC_NA); } break; } @@ -2436,7 +2436,8 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr descr = "Status"; col_add_fstr(pinfo->cinfo, COL_INFO, "Status: %s", tvb_format_text(tvb, offset + SIP2_HDR_LEN + 1, linelen - SIP2_HDR_LEN - 1)); - stat_info->reason_phrase = tvb_get_string(wmem_packet_scope(), tvb, offset + SIP2_HDR_LEN + 5, linelen - (SIP2_HDR_LEN + 5)); + stat_info->reason_phrase = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + SIP2_HDR_LEN + 5, + linelen - (SIP2_HDR_LEN + 5),ENC_UTF_8|ENC_NA); DPRINT(("got Response: %s", tvb_format_text(tvb, offset + SIP2_HDR_LEN + 1, linelen - SIP2_HDR_LEN - 1))); break; @@ -2459,7 +2460,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr case REQUEST_LINE: if (sip_tree) { ti_a = proto_tree_add_item(sip_tree, hf_Request_Line, tvb, - offset, linelen, ENC_ASCII|ENC_NA); + offset, linelen, ENC_UTF_8|ENC_NA); reqresp_tree = proto_item_add_subtree(ti_a, ett_sip_reqresp); } @@ -2469,7 +2470,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr case STATUS_LINE: if (sip_tree) { ti_a = proto_tree_add_item(sip_tree, hf_sip_Status_Line, tvb, - offset, linelen, ENC_ASCII|ENC_NA); + offset, linelen, ENC_UTF_8|ENC_NA); reqresp_tree = proto_item_add_subtree(ti_a, ett_sip_reqresp); } dfilter_sip_status_line(tvb, reqresp_tree, pinfo, linelen, offset); @@ -2490,7 +2491,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr offset = next_offset; if (sip_tree) { th = proto_tree_add_item(sip_tree, hf_sip_msg_hdr, tvb, offset, - tvb_length_remaining(tvb, offset), ENC_ASCII|ENC_NA); + tvb_length_remaining(tvb, offset), ENC_UTF_8|ENC_NA); proto_item_set_text(th, "Message Header"); hdr_tree = proto_item_add_subtree(th, ett_sip_hdr); } @@ -2566,7 +2567,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr } } else { header_len = colon_offset - offset; - header_name = (gchar*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, header_len, ENC_UTF_8); + header_name = (gchar*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, header_len, ENC_UTF_8|ENC_NA); ascii_strdown_inplace(header_name); hf_index = sip_is_known_sip_header(header_name, header_len); @@ -2579,7 +2580,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr * Fetch the value. */ value_len = (gint) (line_end_offset - value_offset); - value = tvb_get_string(wmem_packet_scope(), tvb, value_offset, value_len); + value = tvb_get_string_enc(wmem_packet_scope(), tvb, value_offset, value_len, ENC_UTF_8|ENC_NA); if (hf_index == -1) { proto_item *ti_c = proto_tree_add_text(hdr_tree, tvb, @@ -2621,8 +2622,8 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr if((dissect_sip_name_addr_or_addr_spec(tvb, pinfo, value_offset, line_end_offset+2, &uri_offsets)) != -1){ display_sip_uri(tvb, sip_element_tree, &uri_offsets, &sip_to_uri); if((uri_offsets.name_addr_start != -1) && (uri_offsets.name_addr_end != -1)){ - stat_info->tap_to_addr=tvb_get_string(wmem_packet_scope(), tvb, uri_offsets.name_addr_start, - uri_offsets.name_addr_end - uri_offsets.name_addr_start); + stat_info->tap_to_addr=tvb_get_string_enc(wmem_packet_scope(), tvb, uri_offsets.name_addr_start, + uri_offsets.name_addr_end - uri_offsets.name_addr_start, ENC_UTF_8|ENC_NA); } offset = uri_offsets.name_addr_end +1; } @@ -2645,9 +2646,9 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr parameter_end_offset = line_end_offset; parameter_len = parameter_end_offset - parameter_offset; proto_tree_add_item(sip_element_tree, hf_sip_to_tag, tvb, parameter_offset, - parameter_len, ENC_ASCII|ENC_NA); + parameter_len, ENC_UTF_8|ENC_NA); item = proto_tree_add_item(sip_element_tree, hf_sip_tag, tvb, parameter_offset, - parameter_len, ENC_ASCII|ENC_NA); + parameter_len, ENC_UTF_8|ENC_NA); PROTO_ITEM_SET_HIDDEN(item); /* Tag indicates in-dialog messages, in case we have a INVITE, SUBSCRIBE or REFER, mark it */ @@ -2683,8 +2684,8 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr if((dissect_sip_name_addr_or_addr_spec(tvb, pinfo, value_offset, line_end_offset+2, &uri_offsets)) != -1){ display_sip_uri(tvb, sip_element_tree, &uri_offsets, &sip_from_uri); if((uri_offsets.name_addr_start != -1) && (uri_offsets.name_addr_end != -1)){ - stat_info->tap_from_addr=tvb_get_string(wmem_packet_scope(), tvb, uri_offsets.name_addr_start, - uri_offsets.name_addr_end - uri_offsets.name_addr_start); + stat_info->tap_from_addr=tvb_get_string_enc(wmem_packet_scope(), tvb, uri_offsets.name_addr_start, + uri_offsets.name_addr_end - uri_offsets.name_addr_start, ENC_UTF_8|ENC_NA); } offset = uri_offsets.name_addr_end +1; } @@ -2706,9 +2707,9 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr parameter_end_offset = line_end_offset; parameter_len = parameter_end_offset - parameter_offset; proto_tree_add_item(sip_element_tree, hf_sip_from_tag, tvb, parameter_offset, - parameter_len, ENC_ASCII|ENC_NA); + parameter_len, ENC_UTF_8|ENC_NA); item = proto_tree_add_item(sip_element_tree, hf_sip_tag, tvb, parameter_offset, - parameter_len, ENC_ASCII|ENC_NA); + parameter_len, ENC_UTF_8|ENC_NA); PROTO_ITEM_SET_HIDDEN(item); } }/* hdr_tree */ @@ -2849,7 +2850,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr gint turi_start_offset = hparam_offset + 12; gint turi_end_offset = tvb_find_guint8(tvb, turi_start_offset, -1,'\"'); if (turi_end_offset != -1) - proto_tree_add_item(tc_uri_item_tree, hf_sip_tc_turi, tvb, turi_start_offset,(turi_end_offset - turi_start_offset),ENC_ASCII|ENC_NA); + proto_tree_add_item(tc_uri_item_tree, hf_sip_tc_turi, tvb, turi_start_offset,(turi_end_offset - turi_start_offset),ENC_UTF_8|ENC_NA); else break; /* malformed */ } @@ -2928,7 +2929,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr if (cseq_tree) { proto_tree_add_item(cseq_tree, hf_sip_cseq_method, tvb, - value_offset + sub_value_offset, strlen_to_copy, ENC_ASCII|ENC_NA); + value_offset + sub_value_offset, strlen_to_copy, ENC_UTF_8|ENC_NA); } } break; @@ -3007,7 +3008,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr { proto_tree_add_item(rack_tree, hf_sip_rack_cseq_method, tvb, value_offset + sub_value_offset, - (int)value_len-sub_value_offset, ENC_ASCII|ENC_NA); + (int)value_len-sub_value_offset, ENC_UTF_8|ENC_NA); } break; @@ -3072,10 +3073,10 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr content_type_len = content_type_end - value_offset; content_type_parameter_str_len = value_offset + value_len - parameter_offset; content_type_parameter_str = tvb_get_string_enc(wmem_packet_scope(), tvb, parameter_offset, - content_type_parameter_str_len, ENC_UTF_8); + content_type_parameter_str_len, ENC_UTF_8|ENC_NA); } media_type_str_lower_case = ascii_strdown_inplace( - (gchar *)tvb_get_string_enc(wmem_packet_scope(), tvb, value_offset, content_type_len, ENC_UTF_8)); + (gchar *)tvb_get_string_enc(wmem_packet_scope(), tvb, value_offset, content_type_len, ENC_UTF_8|ENC_NA)); /* Debug code proto_tree_add_text(hdr_tree, tvb, value_offset,content_type_len, @@ -3192,7 +3193,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr /* Set sip.auth as a hidden field/filter */ ti_c = proto_tree_add_item(hdr_tree, hf_sip_auth, tvb, offset, next_offset-offset, - ENC_ASCII|ENC_NA); + ENC_UTF_8|ENC_NA); PROTO_ITEM_SET_HIDDEN(ti_c); /* Authentication-Info does not begin with the scheme name */ @@ -3202,7 +3203,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr comma_offset = tvb_pbrk_guint8(tvb, value_offset, line_end_offset - value_offset, " \t\r\n", NULL); proto_tree_add_item(sip_element_tree, hf_sip_auth_scheme, tvb, value_offset, comma_offset - value_offset, - ENC_ASCII|ENC_NA); + ENC_UTF_8|ENC_NA); }else{ /* The first time comma_offset is "start of parameters" */ comma_offset = value_offset; @@ -3285,7 +3286,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr tvb_format_text(tvb, offset, linelen)); content_encoding_parameter_str = ascii_strdown_inplace(tvb_get_string_enc(wmem_packet_scope(), tvb, value_offset, - (line_end_offset-value_offset), ENC_UTF_8)); + (line_end_offset-value_offset), ENC_UTF_8|ENC_NA)); break; case POS_SECURITY_CLIENT: /* security-client = "Security-Client" HCOLON @@ -3679,7 +3680,7 @@ dfilter_sip_request_line(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gi */ /* get method string*/ - value = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, parameter_len, ENC_UTF_8); + value = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, parameter_len, ENC_UTF_8|ENC_NA); /* Copy request method for telling tap */ stat_info->request_method = value; @@ -3711,7 +3712,7 @@ dfilter_sip_status_line(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gin * We also know that we have a version string followed by a * space at the beginning of the line, for the same reason. */ - response_code = atoi((char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset + SIP2_HDR_LEN + 1, 3, ENC_UTF_8)); + response_code = atoi((char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset + SIP2_HDR_LEN + 1, 3, ENC_UTF_8|ENC_NA)); /* Add numerical response code to tree */ if (tree) { @@ -3872,7 +3873,7 @@ static gboolean sip_is_known_request(tvbuff_t *tvb, int meth_offset, guint i; gchar *meth_name; - meth_name = tvb_get_string_enc(wmem_packet_scope(), tvb, meth_offset, meth_len, ENC_UTF_8); + meth_name = tvb_get_string_enc(wmem_packet_scope(), tvb, meth_offset, meth_len, ENC_UTF_8|ENC_NA); for (i = 1; i < array_length(sip_methods); i++) { if (meth_len == strlen(sip_methods[i]) && |