Fixed "if there are less than 2 bytes left in the buffer, then

framelen is set to 0 or -1", thanks to Frank Dischner.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7361 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2005-08-20 18:19:56 +00:00
parent 159c52dd36
commit b4bdfee43c

View file

@ -641,7 +641,7 @@ static void setid3v2title(int fd, struct mp3entry *entry)
* We must have at least minframesize bytes left for the
* remaining frames to be interesting
*/
while(size >= minframesize ) {
while (size >= minframesize && bufferpos < buffersize - 1) {
flags = 0;
/* Read frame header and check length */