summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
Diffstat (limited to 'gst')
-rw-r--r--gst/cdxaparse/gstcdxaparse.c3
-rw-r--r--gst/festival/gstfestival.c6
-rw-r--r--gst/modplug/gstmodplug.cc3
3 files changed, 11 insertions, 1 deletions
diff --git a/gst/cdxaparse/gstcdxaparse.c b/gst/cdxaparse/gstcdxaparse.c
index 1c2141b2..5af9bd81 100644
--- a/gst/cdxaparse/gstcdxaparse.c
+++ b/gst/cdxaparse/gstcdxaparse.c
@@ -167,6 +167,9 @@ cdxa_type_find (GstBuffer *buf,
GST_DEBUG ("cdxa_parse: typefind");
+ if (GST_BUFFER_SIZE (buf) < 12)
+ return NULL;
+
if (GUINT32_FROM_LE (((guint32 *)data)[0]) != GST_RIFF_TAG_RIFF)
return NULL;
if (GUINT32_FROM_LE (((guint32 *)data)[2]) != GST_RIFF_RIFF_CDXA)
diff --git a/gst/festival/gstfestival.c b/gst/festival/gstfestival.c
index 7f40e3b0..87416184 100644
--- a/gst/festival/gstfestival.c
+++ b/gst/festival/gstfestival.c
@@ -203,8 +203,12 @@ text_type_find (GstBuffer *buf, gpointer private)
gchar *data = GST_BUFFER_DATA (buf);
gint i;
+ /* 20 is arbitrary. 4 is definitely too small. */
+ if (GST_BUFFER_SIZE (buf) < 20)
+ return NULL;
+
for (i=0; i<GST_BUFFER_SIZE (buf); i++) {
- if (!isprint(*(data+i)))
+ if (!isprint(data[i]) && data[i]!='\n')
return NULL;
}
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) ||