diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2005-08-20 18:19:56 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2005-08-20 18:19:56 +0000 |
commit | b4bdfee43cb32bebd1689fbff2409d449ce90604 (patch) | |
tree | 30fcb0dda7a1d6f47ea21da867d0c4d7a8cdef78 /firmware/id3.c | |
parent | 159c52dd36e5c008612458192904f57ea6dfdfad (diff) |
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
Diffstat (limited to 'firmware/id3.c')
-rw-r--r-- | firmware/id3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/id3.c b/firmware/id3.c index d5e9150d14..90500663c1 100644 --- a/firmware/id3.c +++ b/firmware/id3.c @@ -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 */ |