[FFmpeg-cvslog] r11448 - trunk/libavutil/crc.c
aurel
subversion
Mon Jan 7 14:19:38 CET 2008
Author: aurel
Date: Mon Jan 7 14:19:38 2008
New Revision: 11448
Log:
Fix access to the last element of the table.
(size of the table vs. number of elements in the table)
Modified:
trunk/libavutil/crc.c
Modified: trunk/libavutil/crc.c
==============================================================================
--- trunk/libavutil/crc.c (original)
+++ trunk/libavutil/crc.c Mon Jan 7 14:19:38 2008
@@ -91,7 +91,7 @@ int av_crc_init(AVCRC *ctx, int le, int
*/
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,
More information about the ffmpeg-cvslog
mailing list