Commit e19b53f8 authored by Max Kellermann's avatar Max Kellermann

aac: check the buffer length in the ADIF parser

Check whether enough data has been read yet.
parent b30ec730
......@@ -220,6 +220,12 @@ static void aac_parse_header(AacBuffer * b, float *length)
unsigned bitRate;
size_t skipSize = (b->buffer[4] & 0x80) ? 9 : 0;
if (8 + skipSize > b->bytesIntoBuffer)
/* not enough data yet; skip parsing this
header */
return;
bitRate =
((unsigned int)(b->
buffer[4 +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment