From: David Schleef Date: Fri, 6 Jun 2003 20:24:13 +0000 (+0000) Subject: Make sure buffer is long enough in type_find. Attempt to fix #114580 X-Git-Tag: BRANCH-ERROR-ROOT~148 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d14fa98cbab8dd1c91b69a4c22ccf2553287687;p=platform%2Fupstream%2Fgst-plugins-good.git Make sure buffer is long enough in type_find. Attempt to fix #114580 Original commit message from CVS: Make sure buffer is long enough in type_find. Attempt to fix #114580 --- diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c index fdddef6d7..337d920f8 100644 --- a/gst/flx/gstflxdec.c +++ b/gst/flx/gstflxdec.c @@ -114,6 +114,10 @@ flxdec_type_find (GstBuffer *buf, gpointer private) guchar *data = GST_BUFFER_DATA(buf); GstCaps *new; + if(GST_BUFFER_SIZE(buf) < 134){ + return NULL; + } + /* check magic */ if ((data[4] == 0x11 || data[4] == 0x12 || data[4] == 0x30 || data[4] == 0x44) && data[5] == 0xaf) {