[Bug 751883] rtcpbuffer: Fix validation of packets with padding

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Jul 3 02:33:42 PDT 2015


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

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #306687|none                        |needs-work
             status|                            |

--- Comment #1 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 306687:
 --> (https://bugzilla.gnome.org/review?bug=751883&attachment=306687)

::: gst-libs/gst/rtp/gstrtcpbuffer.c
@@ +150,2 @@
     /* get padding */
+    pad_bytes = data[-1];

Don't use negative array indices please

@@ +150,3 @@
     /* get padding */
+    pad_bytes = data[-1];
+    if (pad_bytes == 0 || pad_bytes >= header_len)

The value of the padding should be the length of the packet? Or ...?

::: tests/check/libs/rtp.c
@@ +824,3 @@
+
+  fail_unless (gst_rtcp_buffer_validate_data (rtcp_pkt,
+          sizeof (rtcp_pkt)) == TRUE);

Don't compare to TRUE or FALSE, just do fail_if() or fail_unless()

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list