rtcpbuffer: prevent overflow of 16bit header length.
authorPascal Buhler <pabuhler@cisco.com>
Wed, 12 Oct 2011 09:28:10 +0000 (11:28 +0200)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 5 Jan 2012 11:12:25 +0000 (11:12 +0000)
RTCP header can be  (2^16 + 1) * 4 bytes long, so when validating a bogus
packet it was possible to get a 16bit overflow resulting in a length of 0.
This would put the gst_rtcp_buffer_validate_data function in a endless loop.

https://bugzilla.gnome.org/show_bug.cgi?id=667313

gst-libs/gst/rtp/gstrtcpbuffer.c

index fbd928c..539f763 100644 (file)
@@ -111,7 +111,7 @@ gboolean
 gst_rtcp_buffer_validate_data (guint8 * data, guint len)
 {
   guint16 header_mask;
-  guint16 header_len;
+  guint header_len;
   guint8 version;
   guint data_len;
   gboolean padding;