aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/aac_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder/aac_plugin.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/decoder/aac_plugin.c b/src/decoder/aac_plugin.c
index 477efb773..63003e7c2 100644
--- a/src/decoder/aac_plugin.c
+++ b/src/decoder/aac_plugin.c
@@ -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 +