diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2008-01-07 13:19:38 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2008-01-07 13:19:38 +0000 |
commit | 03d83abcc686fe67d6126c8562224e2e01395971 (patch) | |
tree | e62df60949c74e8dea0a95139203ced8c26bebf0 | |
parent | 81fe0cfc0ba7eac51eaa0fc470d851a659c87cd7 (diff) | |
download | ffmpeg-03d83abcc686fe67d6126c8562224e2e01395971.tar.gz |
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
-rw-r--r-- | libavutil/crc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/crc.c b/libavutil/crc.c index 5ccf03639b..b715a6558d 100644 --- a/libavutil/crc.c +++ b/libavutil/crc.c @@ -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, |