aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sip.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2006-06-28 20:30:42 +0000
committerGerald Combs <gerald@wireshark.org>2006-06-28 20:30:42 +0000
commit8e5bdb964d92c945f64a6348eba75bd612ca9d00 (patch)
treefc768fa9dc4bea9e6e6d9a8351baf6cf693df830 /epan/dissectors/packet-sip.c
parent832136aee896446fec01a3d185e6bbac9ea74760 (diff)
Pass tvb_format_text() through a format string, in case it returns any
"%" characters. svn path=/trunk/; revision=18600
Diffstat (limited to 'epan/dissectors/packet-sip.c')
-rw-r--r--epan/dissectors/packet-sip.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c
index a6f852fb57..a19aaff33e 100644
--- a/epan/dissectors/packet-sip.c
+++ b/epan/dissectors/packet-sip.c
@@ -942,7 +942,7 @@ dissect_sip_contact_item(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gi
}
current_offset = queried_offset;
- /* Is it escaped?
+ /* Is it escaped?
* Look for uneven number of backslashes before '"' */
for(i=0;tvb_get_guint8(tvb, queried_offset - (i+1) ) == '\\';i++);
i=i%2;
@@ -1020,17 +1020,17 @@ dissect_sip_authorization_item(tvbuff_t *tvb, proto_tree *tree, gint start_offse
}
current_offset = start_offset;
-
+
/* Now look for the end of the parameter */
while (current_offset < line_end_offset)
{
c = tvb_get_guint8(tvb, current_offset);
-
+
if (c == '=')
{
equals_offset = current_offset;
}
-
+
if(c == '"')
{
/* look for the next unescaped '"' */
@@ -1043,7 +1043,7 @@ dissect_sip_authorization_item(tvbuff_t *tvb, proto_tree *tree, gint start_offse
return -1;
}
- /* Is it escaped?
+ /* Is it escaped?
* Look for uneven number of backslashes before '"' */
for(i=0;tvb_get_guint8(tvb, current_offset - (i+1) ) == '\\';i++);
i=i%2;
@@ -1087,7 +1087,7 @@ dissect_sip_authorization_item(tvbuff_t *tvb, proto_tree *tree, gint start_offse
if (i == array_length(auth_parameters_hf_array))
{
proto_tree_add_text(tree, tvb, start_offset, current_offset-start_offset,
- tvb_format_text(tvb, start_offset,
+ "%s", tvb_format_text(tvb, start_offset,
current_offset-start_offset));
}
@@ -1219,7 +1219,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
if (tvb_strnlen(tvb, offset, linelen) > -1)
{
/*
- * There's a NULL in the line,
+ * There's a NULL in the line,
* this may be SIP within another protocol.
* This heuristic still needs to improve.
*/
@@ -1241,7 +1241,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
* Just dissect it as a continuation.
*/
} else if (use_reassembly) {
-
+
/*
* Yes, it's a request or response.
* Do header desegmentation if we've been told to,
@@ -1802,7 +1802,7 @@ separator_found2:
comma_offset++; /* skip comma */
}
break;
-
+
case POS_AUTHORIZATION:
case POS_WWW_AUTHENTICATE:
case POS_PROXY_AUTHENTICATE: