From 0b6cc7eb96dda3ceb79fc7c143e7426877586c98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Tue, 12 Jul 2011 18:03:53 -0400 Subject: rtpvp8: Reject unknown bitstream versions --- gst/rtpvp8/gstrtpvp8pay.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gst/rtpvp8') diff --git a/gst/rtpvp8/gstrtpvp8pay.c b/gst/rtpvp8/gstrtpvp8pay.c index b54ec2898..c6c773dca 100644 --- a/gst/rtpvp8/gstrtpvp8pay.c +++ b/gst/rtpvp8/gstrtpvp8pay.c @@ -141,6 +141,11 @@ gst_rtp_vp8_pay_parse_frame (GstRtpVP8Pay * self, GstBuffer * buffer) self->is_keyframe = keyframe = ((data[0] & 0x1) == 0); version = (data[0] >> 1) & 0x7; + if (G_UNLIKELY (version > 3)) { + GST_ERROR_OBJECT (self, "Unknown VP8 version %u", version); + goto error; + } + /* keyframe, version and show_frame use 5 bits */ header_size = data[2] << 11 | data[1] << 3 | (data[0] >> 5); -- cgit v1.2.1