mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
aacparse: ensure sufficient data available before accessing
This commit is contained in:
parent
64d6d5554e
commit
d80b3e2f3b
1 changed files with 3 additions and 0 deletions
|
@ -342,6 +342,9 @@ gst_aacparse_check_adts_frame (GstAacParse * aacparse,
|
||||||
const guint8 * data,
|
const guint8 * data,
|
||||||
const guint avail, guint * framesize, guint * needed_data)
|
const guint avail, guint * framesize, guint * needed_data)
|
||||||
{
|
{
|
||||||
|
if (G_UNLIKELY (avail < 2))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if ((data[0] == 0xff) && ((data[1] & 0xf6) == 0xf0)) {
|
if ((data[0] == 0xff) && ((data[1] & 0xf6) == 0xf0)) {
|
||||||
*framesize = gst_aacparse_adts_get_frame_len (data);
|
*framesize = gst_aacparse_adts_get_frame_len (data);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue