1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Fix access to the last element of the table.

(size of the table vs. number of elements in the table)

Originally committed as revision 11448 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs 2008-01-07 13:19:38 +00:00
parent 81fe0cfc0b
commit 03d83abcc6

View File

@ -91,7 +91,7 @@ int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size){
*/
const AVCRC *av_crc_get_table(AVCRCId crc_id){
#ifndef CONFIG_HARDCODED_TABLES
if (!av_crc_table[crc_id][sizeof(av_crc_table[crc_id])-1])
if (!av_crc_table[crc_id][sizeof(av_crc_table[crc_id])/sizeof(av_crc_table[crc_id][0])-1])
if (av_crc_init(av_crc_table[crc_id],
av_crc_table_params[crc_id].le,
av_crc_table_params[crc_id].bits,