aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2015-11-03 10:00:30 +0100
committerAnders Broman <a.broman58@gmail.com>2015-11-03 14:33:45 +0000
commit6c64a41017e078ed6e873c9547cebbd117a7b549 (patch)
treed4c805ffbf010ebfb26f674d810f53c292386250 /epan
parentf528f55cd5066166bb8136a905648de3cb466c29 (diff)
[SIP] Rework how the length of the diagnostic string is determined, it did
not work with multiple SIP packages in one frame. Change-Id: Ie142aeea0c6ad28cfdd6206738a6f147094c479f Reviewed-on: https://code.wireshark.org/review/11516 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-sip.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c
index c87e53ac54..8160c87001 100644
--- a/epan/dissectors/packet-sip.c
+++ b/epan/dissectors/packet-sip.c
@@ -4058,22 +4058,22 @@ 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|ENC_NA));
+ offset = offset + SIP2_HDR_LEN + 1;
+ response_code = atoi((char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 3, ENC_UTF_8|ENC_NA));
/* Add numerical response code to tree */
if (tree) {
- proto_tree_add_uint(tree, hf_sip_Status_Code, tvb, offset + SIP2_HDR_LEN + 1,
- 3, response_code);
+ proto_tree_add_uint(tree, hf_sip_Status_Code, tvb, offset, 3, response_code);
}
/* Add response code for sending to tap */
stat_info->response_code = response_code;
/* Skip past the responce code and possible trailing space */
- offset = SIP2_HDR_LEN + 1 + 3 + 1;
+ offset = offset + 3 + 1;
/* Check for diagnostics */
- diag_len = line_end - offset;
+ diag_len = line_end - (SIP2_HDR_LEN + 1 + 3 + 1);
if((diag_len) <= 0)
return;