From dc36590d0c95703b8fc1e5bc9ba98f5a0a035e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Wed, 18 Feb 2009 17:05:13 -0500 Subject: [PATCH] rtpmux: Validate RTP data in RTP Mux --- gst/rtpmanager/gstrtpmux.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/rtpmanager/gstrtpmux.c b/gst/rtpmanager/gstrtpmux.c index 23c06f2a95..f460085192 100644 --- a/gst/rtpmanager/gstrtpmux.c +++ b/gst/rtpmanager/gstrtpmux.c @@ -363,6 +363,12 @@ gst_rtp_mux_chain (GstPad * pad, GstBuffer * buffer) rtp_mux = GST_RTP_MUX (gst_pad_get_parent (pad)); + if (!gst_rtp_buffer_validate (buffer)) { + GST_ERROR_OBJECT (rtp_mux, "Invalid RTP buffer"); + gst_object_unref (rtp_mux); + return GST_FLOW_ERROR; + } + buffer = gst_buffer_make_writable(buffer); rtp_mux->seqnum++;