aac: check the buffer length in the ADIF parser
Check whether enough data has been read yet.
This commit is contained in:
parent
b30ec73099
commit
e19b53f814
@ -220,6 +220,12 @@ static void aac_parse_header(AacBuffer * b, float *length)
|
|||||||
unsigned bitRate;
|
unsigned bitRate;
|
||||||
size_t skipSize = (b->buffer[4] & 0x80) ? 9 : 0;
|
size_t skipSize = (b->buffer[4] & 0x80) ? 9 : 0;
|
||||||
|
|
||||||
|
|
||||||
|
if (8 + skipSize > b->bytesIntoBuffer)
|
||||||
|
/* not enough data yet; skip parsing this
|
||||||
|
header */
|
||||||
|
return;
|
||||||
|
|
||||||
bitRate =
|
bitRate =
|
||||||
((unsigned int)(b->
|
((unsigned int)(b->
|
||||||
buffer[4 +
|
buffer[4 +
|
||||||
|
Loading…
Reference in New Issue
Block a user