aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtp.c
diff options
context:
space:
mode:
authorCarlos Velasco <carlos.velasco@nimastelecom.com>2016-04-18 11:40:50 +0200
committerMichael Mann <mmann78@netscape.net>2016-04-18 11:46:40 +0000
commitd93498ee76fcdde51320bf244adcf86cf5d30cd4 (patch)
tree2867f1922285aedf1d9f5d0c9ed5124555d9e479 /epan/dissectors/packet-rtp.c
parent1d30bb099618035458cd905f543e454801f09d1c (diff)
RTP: fix decoding of padding in RFC 585 header extension
Bug: 12339 Change-Id: I465e8daf2529f34ab23a614e5fdf85d48232321f Reviewed-on: https://code.wireshark.org/review/14989 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-rtp.c')
-rw-r--r--epan/dissectors/packet-rtp.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c
index d6087427d3..53a2107460 100644
--- a/epan/dissectors/packet-rtp.c
+++ b/epan/dissectors/packet-rtp.c
@@ -369,12 +369,12 @@ static guint rtp_rfc2198_pt = 99;
#define RTP_ED137A_feature_sqi_qidx_ml_rssi 0
#define RTP_ED137A_feature_sqi_qidx_rssi_max 15
-/* RFC 5215 one byte header signature */
-#define RTP_RFC5215_ONE_BYTE_SIG 0xBEDE
+/* RFC 5285 one byte header signature */
+#define RTP_RFC5285_ONE_BYTE_SIG 0xBEDE
-/* RFC 5215 two byte header mask and signature */
-#define RTP_RFC5215_TWO_BYTE_MASK 0xFFF0
-#define RTP_RFC5215_TWO_BYTE_SIG 0x1000
+/* RFC 5285 two byte header mask and signature */
+#define RTP_RFC5285_TWO_BYTE_MASK 0xFFF0
+#define RTP_RFC5285_TWO_BYTE_SIG 0x1000
/* CSRC count is the last four bits */
#define RTP_CSRC_COUNT(octet) ((octet) & 0xF)
@@ -1822,7 +1822,7 @@ dissect_rtp_rfc2198(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
}
static void
-dissect_rtp_hext_rfc5215_onebyte( tvbuff_t *tvb, packet_info *pinfo,
+dissect_rtp_hext_rfc5285_onebyte( tvbuff_t *tvb, packet_info *pinfo,
proto_tree *rtp_hext_tree )
{
proto_tree *rtp_hext_rfc5285_tree = NULL;
@@ -1845,7 +1845,7 @@ dissect_rtp_hext_rfc5215_onebyte( tvbuff_t *tvb, packet_info *pinfo,
/* Add padding */
if (ext_offset > start_ext_offset)
- proto_tree_add_item(rtp_hext_tree, hf_rtp_padding_data, tvb, ext_offset, ext_offset-start_ext_offset, ENC_NA );
+ proto_tree_add_item(rtp_hext_tree, hf_rtp_padding_data, tvb, start_ext_offset, ext_offset-start_ext_offset, ENC_NA );
ext_hdr_hdr = tvb_get_guint8 (tvb, ext_offset);
ext_id = ext_hdr_hdr >> 4;
@@ -1882,7 +1882,7 @@ dissect_rtp_hext_rfc5215_onebyte( tvbuff_t *tvb, packet_info *pinfo,
static void
-dissect_rtp_hext_rfc5215_twobytes(tvbuff_t *parent_tvb, guint id_offset,
+dissect_rtp_hext_rfc5285_twobytes(tvbuff_t *parent_tvb, guint id_offset,
guint8 id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtp_hext_tree)
{
proto_tree *rtp_hext_rfc5285_tree = NULL;
@@ -1902,7 +1902,7 @@ dissect_rtp_hext_rfc5215_twobytes(tvbuff_t *parent_tvb, guint id_offset,
}
/* Add padding */
if (ext_offset > start_ext_offset)
- proto_tree_add_item(rtp_hext_tree, hf_rtp_padding_data, tvb, ext_offset, ext_offset-start_ext_offset, ENC_NA );
+ proto_tree_add_item(rtp_hext_tree, hf_rtp_padding_data, tvb, start_ext_offset, ext_offset-start_ext_offset, ENC_NA );
ext_id = tvb_get_guint8 (tvb, ext_offset);
ext_length = tvb_get_guint8 (tvb, ext_offset + 1);
@@ -2241,11 +2241,11 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
/* pass interpretation of header extension to a registered subdissector */
newtvb = tvb_new_subset_length(tvb, offset, hdr_extension_len * 4);
- if (hdr_extension_id == RTP_RFC5215_ONE_BYTE_SIG) {
- dissect_rtp_hext_rfc5215_onebyte (newtvb, pinfo, rtp_hext_tree);
+ if (hdr_extension_id == RTP_RFC5285_ONE_BYTE_SIG) {
+ dissect_rtp_hext_rfc5285_onebyte (newtvb, pinfo, rtp_hext_tree);
}
- else if ((hdr_extension_id & RTP_RFC5215_TWO_BYTE_MASK) == RTP_RFC5215_TWO_BYTE_SIG) {
- dissect_rtp_hext_rfc5215_twobytes(tvb,
+ else if ((hdr_extension_id & RTP_RFC5285_TWO_BYTE_MASK) == RTP_RFC5285_TWO_BYTE_SIG) {
+ dissect_rtp_hext_rfc5285_twobytes(tvb,
offset - 4, hdr_extension_id, newtvb,
pinfo, rtp_hext_tree);
}