summaryrefslogtreecommitdiffstats
path: root/gst/flx/gstflxdec.c
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-06-06 20:24:13 +0000
committerDavid Schleef <ds@schleef.org>2003-06-06 20:24:13 +0000
commit2d14fa98cbab8dd1c91b69a4c22ccf2553287687 (patch)
tree02e6884cebdf9ba765e4db98828a27f7d4d18b07 /gst/flx/gstflxdec.c
parentdbf13a6d539a49d9eaa9e928c5b3ba5665a269a4 (diff)
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
Diffstat (limited to 'gst/flx/gstflxdec.c')
-rw-r--r--gst/flx/gstflxdec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c
index fdddef6d..337d920f 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) {