From ca423ed0e317645c8febb8dc604743f0fd47139a Mon Sep 17 00:00:00 2001 From: Jack Whitham Date: Thu, 11 Jul 2013 21:09:58 +0100 Subject: [PATCH] Proposed fix for FS#12878: Zero-length embedded album art prevents mp3 playback see http://www.rockbox.org/tracker/task/12878 Change-Id: Ib4233c06e18d1d193dfb9e73e745ca5d174e40b2 Reviewed-on: http://gerrit.rockbox.org/507 Reviewed-by: Michael Giacomelli Reviewed-by: Thomas Martitz --- lib/rbcodec/metadata/id3tags.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rbcodec/metadata/id3tags.c b/lib/rbcodec/metadata/id3tags.c index fed99d81a0..3492197c40 100644 --- a/lib/rbcodec/metadata/id3tags.c +++ b/lib/rbcodec/metadata/id3tags.c @@ -355,7 +355,8 @@ static int parsealbumart( struct mp3entry* entry, char* tag, int bufferpos ) /* fixup offset&size for image data */ entry->albumart.pos += tag - start; entry->albumart.size -= tag - start; - entry->has_embedded_albumart = true; + /* check for malformed tag with no picture data */ + entry->has_embedded_albumart = (entry->albumart.size != 0); } /* return bufferpos as we didn't store anything in id3v2buf */ return bufferpos;