From 432abf42c3a5bcf4ac6d3674bf028951587f86bd Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Mon, 23 Nov 2009 16:34:50 +0100 Subject: [PATCH] ac3parse: ensure sufficient data available for parsing --- gst/audioparsers/gstac3parse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst/audioparsers/gstac3parse.c b/gst/audioparsers/gstac3parse.c index 1da4c96..ccf20a1 100644 --- a/gst/audioparsers/gstac3parse.c +++ b/gst/audioparsers/gstac3parse.c @@ -387,6 +387,9 @@ gst_ac3_parse_check_valid_frame (GstBaseParse * parse, GstBuffer * buf, gint off; gboolean sync, drain; + if (G_UNLIKELY (GST_BUFFER_SIZE (buf) < 6)) + return FALSE; + off = gst_byte_reader_masked_scan_uint32 (&reader, 0xffff0000, 0x0b770000, 0, GST_BUFFER_SIZE (buf)); -- 2.7.4