From: Andre Noll Date: Sun, 19 Apr 2009 21:17:08 +0000 (+0200) Subject: Fix off-by-one bug in mp3_afh. X-Git-Tag: v0.3.5~61^2~9 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=3778b1e853137fbf137b3eeffcd6eedc645a8c5d;p=paraslash.git Fix off-by-one bug in mp3_afh. --- 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);