From 3778b1e853137fbf137b3eeffcd6eedc645a8c5d Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 19 Apr 2009 23:17:08 +0200 Subject: [PATCH] Fix off-by-one bug in mp3_afh. --- mp3_afh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mp3_afh.c b/mp3_afh.c index 8eec436c..72c5df74 100644 --- 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); -- 2.39.5