aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder/faad_plugin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/decoder/faad_plugin.c b/src/decoder/faad_plugin.c
index ec93b9f47..77d12066c 100644
--- a/src/decoder/faad_plugin.c
+++ b/src/decoder/faad_plugin.c
@@ -217,7 +217,7 @@ faad_song_duration(struct faad_buffer *b, float *length)
b->consumed = 0;
faad_buffer_fill(b);
- } else if (memcmp(b->data, "ADIF", 4) == 0) {
+ } else if (b->length >= 5 && memcmp(b->data, "ADIF", 4) == 0) {
unsigned bit_rate;
size_t skip_size = (b->data[4] & 0x80) ? 9 : 0;