Fix FS#9522: stop reading an ID3v2 tag if a frame length is bad.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19005 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6f32dab2ae
commit
5a00367a08
1 changed files with 7 additions and 1 deletions
|
@ -774,7 +774,7 @@ static void setid3v2title(int fd, struct mp3entry *entry)
|
|||
framelen = bytes2int(0, header[3], header[4], header[5]);
|
||||
}
|
||||
|
||||
logf("framelen = %ld", framelen);
|
||||
logf("framelen = %ld, flags = 0x%04x", framelen, flags);
|
||||
if(framelen == 0){
|
||||
if (header[0] == 0 && header[1] == 0 && header[2] == 0)
|
||||
return;
|
||||
|
@ -821,7 +821,13 @@ static void setid3v2title(int fd, struct mp3entry *entry)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (framelen == 0)
|
||||
continue;
|
||||
|
||||
if (framelen < 0)
|
||||
return;
|
||||
|
||||
/* Keep track of the remaining frame size */
|
||||
totframelen = framelen;
|
||||
|
||||
|
|
Loading…
Reference in a new issue