]> git.tue.mpg.de Git - paraslash.git/commitdiff
Fix off-by-one bug in mp3_afh.
authorAndre Noll <maan@systemlinux.org>
Sun, 19 Apr 2009 21:17:08 +0000 (23:17 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 19 Apr 2009 21:17:08 +0000 (23:17 +0200)
mp3_afh.c

index 8eec436cffd3fed1c3f8c2f59a7468ebc17c7788..72c5df7407d567a7ca35bed733829b33057c94de 100644 (file)
--- a/mp3_afh.c
+++ b/mp3_afh.c
@@ -445,7 +445,7 @@ static int mp3_read_info(unsigned char *map, size_t numbytes, int fd,
        ret = -E_MP3_INFO;
        if (!afhi->chunks_total || !freq_sum || !br_sum)
                goto err_out;
-       afhi->chunk_table[afhi->chunks_total] = numbytes - 1;
+       afhi->chunk_table[afhi->chunks_total] = numbytes;
        afhi->bitrate = br_sum / afhi->chunks_total;
        afhi->frequency = freq_sum / afhi->chunks_total;
        afhi->channels = header_channels(&header);