Commit 16a5e58e authored by aurel's avatar aurel

Fix access to the last element of the table.

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11448 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ac4539fb
...@@ -91,7 +91,7 @@ int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size){ ...@@ -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){ const AVCRC *av_crc_get_table(AVCRCId crc_id){
#ifndef CONFIG_HARDCODED_TABLES #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], if (av_crc_init(av_crc_table[crc_id],
av_crc_table_params[crc_id].le, av_crc_table_params[crc_id].le,
av_crc_table_params[crc_id].bits, av_crc_table_params[crc_id].bits,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment