aacparse: ensure sufficient data available before accessing

This commit is contained in:
Mark Nauwelaerts 2009-11-26 17:04:36 +01:00 committed by Tim-Philipp Müller
parent f3d2429f92
commit 7cd3f0a2db

View file

@ -342,6 +342,9 @@ gst_aacparse_check_adts_frame (GstAacParse * aacparse,
const guint8 * data,
const guint avail, guint * framesize, guint * needed_data)
{
if (G_UNLIKELY (avail < 2))
return FALSE;
if ((data[0] == 0xff) && ((data[1] & 0xf6) == 0xf0)) {
*framesize = gst_aacparse_adts_get_frame_len (data);