From df6946e684bf1d265573cebb92eef39f8b1acf09 Mon Sep 17 00:00:00 2001 From: Jeremy Simon Date: Sun, 21 Sep 2003 19:20:38 +0000 Subject: [PATCH] Check buffer size in typefind function Original commit message from CVS: Check buffer size in typefind function --- ext/flac/gstflac.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/flac/gstflac.c b/ext/flac/gstflac.c index 3f00d3709..1069aaed1 100644 --- a/ext/flac/gstflac.c +++ b/ext/flac/gstflac.c @@ -75,6 +75,9 @@ flac_type_find (GstBuffer *buf, gpointer private) gint size; guint32 head = GUINT32_FROM_BE (*((guint32 *)GST_BUFFER_DATA (buf))); + if (GST_BUFFER_SIZE (buf) < 4) + return NULL; + data = GST_BUFFER_DATA (buf); size = GST_BUFFER_SIZE (buf); -- GitLab