summaryrefslogtreecommitdiffstats
path: root/gst/modplug/gstmodplug.cc
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-07-24 08:49:43 +0000
committerDavid Schleef <ds@schleef.org>2003-07-24 08:49:43 +0000
commita962c0f40c1bf71b44a67f898a35122f158b6b25 (patch)
tree591c4255a1b28c76e1a0331e6648bb3f6585fad9 /gst/modplug/gstmodplug.cc
parenta287b1e4420e0d89ca83e1343acbbae74c8aea9b (diff)
downloadgst-plugins-bad-a962c0f40c1bf71b44a67f898a35122f158b6b25.tar.gz
gst-plugins-bad-a962c0f40c1bf71b44a67f898a35122f158b6b25.tar.bz2
gst-plugins-bad-a962c0f40c1bf71b44a67f898a35122f158b6b25.zip
Add buffer length checks to every typefinding function
Original commit message from CVS: Add buffer length checks to every typefinding function
Diffstat (limited to 'gst/modplug/gstmodplug.cc')
-rw-r--r--gst/modplug/gstmodplug.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/modplug/gstmodplug.cc b/gst/modplug/gstmodplug.cc
index 9270938b..2fa602f7 100644
--- a/gst/modplug/gstmodplug.cc
+++ b/gst/modplug/gstmodplug.cc
@@ -132,6 +132,9 @@ static GstElementClass *parent_class = NULL;
static GstCaps*
modplug_type_find (GstBuffer *buf, gpointer priv)
{
+ if (GST_BUFFER_SIZE (buf) < 75)
+ return NULL;
+
if (MOD_CheckType (buf) ||
Mod_669_CheckType (buf) ||
Amf_CheckType (buf) ||