From: Stian Selnes Date: Tue, 21 Jul 2015 11:31:05 +0000 (+0200) Subject: rtpvp8depay: Check available bytes before copy X-Git-Tag: 1.19.3~509^2~3385 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=45e05706e28439961ac81ce0c8e6403e8e8f03f5;p=platform%2Fupstream%2Fgstreamer.git rtpvp8depay: Check available bytes before copy Need to check that the number of bytes we want to copy from the adapter actually is available and handle the error case gracefully. This error may happen if malformed packets are received and we don't have a complete frame. https://bugzilla.gnome.org/show_bug.cgi?id=752663 --- diff --git a/gst/rtp/gstrtpvp8depay.c b/gst/rtp/gstrtpvp8depay.c index 128bb7d..f87a80f 100644 --- a/gst/rtp/gstrtpvp8depay.c +++ b/gst/rtp/gstrtpvp8depay.c @@ -173,6 +173,8 @@ gst_rtp_vp8_depay_process (GstRTPBaseDepayload * depay, GstRTPBuffer * rtp) GstBuffer *out; guint8 header[10]; + if (gst_adapter_available (self->adapter) < 10) + goto too_small; gst_adapter_copy (self->adapter, &header, 0, 10); out = gst_adapter_take_buffer (self->adapter,