Index: apps/metadata/mp4.c =================================================================== --- apps/metadata/mp4.c (revision 29173) +++ apps/metadata/mp4.c (working copy) @@ -596,7 +596,8 @@ 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; @@ -752,8 +753,8 @@ } id3->bitrate = ((int64_t) id3->filesize * 8) / id3->length; - DEBUGF("MP4 bitrate %d, frequency %ld Hz, length %ld ms\n", - id3->bitrate, id3->frequency, id3->length); + DEBUGF("MP4 bitrate %d, frequency %ld Hz, length %ld ms, size %ld bytes\n", + id3->bitrate, id3->frequency, id3->length, id3->filesize); } else {