1
0
Fork 0
forked from len0rd/rockbox

Removing the ID3V1 tag could give a negative len variable

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2299 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2002-09-16 13:31:17 +00:00
parent a6df1fd48d
commit 2bd519d7b7

View file

@ -1229,8 +1229,10 @@ static void mpeg_thread(void)
/* Make sure that the write pointer is at a word /* Make sure that the write pointer is at a word
boundary when we reach the end of the file */ boundary when we reach the end of the file */
if (len < amount_to_read) { if (len < amount_to_read) {
/* skip id3v1 tag */ /* Skip id3v1 tag */
len -= id3tags[tag_read_idx]->id3.id3v1len; len -= id3tags[tag_read_idx]->id3.id3v1len;
if(len < 0)
len = 0;
len = (len + 1) & 0xfffffffe; len = (len + 1) & 0xfffffffe;
} }