summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/metadata/mp4.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/metadata/mp4.c b/apps/metadata/mp4.c
index b3ff348..a59b3f9 100644
--- a/apps/metadata/mp4.c
+++ b/apps/metadata/mp4.c
@@ -596,7 +596,8 @@ static bool read_mp4_container(int fd, struct mp3entry* id3,
break;
case MP4_ilst:
- if (handler == MP4_mdir)
+ /* We need at least a size of 8 to read the next atom. */
+ if (handler == MP4_mdir && size>8)
{
rc = read_mp4_tags(fd, id3, size);
size = 0;