[FFmpeg-cvslog] r26360 - trunk/libavcodec/ivi_common.c
cehoyos
subversion
Sat Jan 15 11:18:38 CET 2011
Author: cehoyos
Date: Sat Jan 15 11:18:38 2011
New Revision: 26360
Log:
Check symbol validity to avoid a crash, fixes issue 2523.
Patch by Daniel Kang, daniel.d.kang at gmail
Modified:
trunk/libavcodec/ivi_common.c
Modified: trunk/libavcodec/ivi_common.c
==============================================================================
--- trunk/libavcodec/ivi_common.c Sat Jan 15 02:59:31 2011 (r26359)
+++ trunk/libavcodec/ivi_common.c Sat Jan 15 11:18:38 2011 (r26360)
@@ -404,6 +404,10 @@ int ff_ivi_decode_blocks(GetBitContext *
hi = get_vlc2(gb, band->blk_vlc.tab->table, IVI_VLC_BITS, 1);
val = IVI_TOSIGNED((hi << 6) | lo); /* merge them and convert into signed val */
} else {
+ if (sym >= 256U) {
+ av_log(NULL, AV_LOG_ERROR, "Invalid sym encountered: %d.\n", sym);
+ return -1;
+ }
run = rvmap->runtab[sym];
val = rvmap->valtab[sym];
}
More information about the ffmpeg-cvslog
mailing list