aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtp.c
diff options
context:
space:
mode:
authorSergio Moreno Mozota <sergio.morenomozota@telefonica.com>2015-01-17 23:24:22 -0500
committerMichael Mann <mmann78@netscape.net>2015-01-19 02:57:13 +0000
commit199cb062e114f0f27b378467a785f90452bfd5f5 (patch)
treec3b5d7b1b4cd103db651577ffb5120a9442fee39 /epan/dissectors/packet-rtp.c
parente333e4c90f0aca41b0a56cef22fd80d0b0e73e14 (diff)
RTP: Parse problem in dissect_rtp_hext_rfc5215_onebyte
some commercial IPTV streamers send bogus info in the extension headers, add some sanity check to skip the erroneous bytes. Bug: 10513 Change-Id: I6f20073a00ed0f791fa99701534360d304060053 Reviewed-on: https://code.wireshark.org/review/6606 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c
index 29cb9c3937..d44101bc76 100644
--- a/epan/dissectors/packet-rtp.c
+++ b/epan/dissectors/packet-rtp.c
@@ -1833,6 +1833,12 @@ dissect_rtp_hext_rfc5215_onebyte( tvbuff_t *tvb, packet_info *pinfo,
return;
ext_length = (ext_hdr_hdr & 0x0F) + 1;
+
+ /* Exit on malformed extension headers */
+ if (ext_offset + ext_length + 1 > tvb_captured_length (tvb)) {
+ return;
+ }
+
if (rtp_hext_tree) {
rtp_hext_rfc5285_tree = proto_tree_add_subtree(rtp_hext_tree, tvb, ext_offset, ext_length + 1,
ett_hdr_ext_rfc5285, NULL, "RFC 5285 Header Extension (One-Byte Header)");