From 322baf19c80857f1f2b016ec6bf043d09c67d154 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 24 Jul 2003 08:49:42 +0000 Subject: Add buffer length checks to every typefinding function Original commit message from CVS: Add buffer length checks to every typefinding function --- gst/auparse/gstauparse.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gst/auparse/gstauparse.c') diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c index 82f802f1..9942fd7b 100644 --- a/gst/auparse/gstauparse.c +++ b/gst/auparse/gstauparse.c @@ -47,6 +47,9 @@ au_type_find (GstBuffer *buf, gpointer private) GstCaps *new = NULL; gulong *head = (gulong *) GST_BUFFER_DATA (buf); + if (GST_BUFFER_SIZE (buf) < 4) + return NULL; + if (*head == 0x2e736e64 || *head == 0x646e732e) new = gst_caps_new ("au_type_find", "audio/au", NULL); -- cgit