mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
Check symbol validity to avoid a crash, fixes issue 2523.
Patch by Daniel Kang, daniel.d.kang at gmail Originally committed as revision 26360 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
0db5d2b09e
commit
eb40d7ffa7
@ -404,6 +404,10 @@ int ff_ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile)
|
||||
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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user