History

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

Daniel Kang committed 15 years ago

Commit eb40d7f1 parent 0db5d2b1 file · +4 −0Browse files

Unified · Split

libavcodec/ivi_common.c+4−0
@@ -404,6 +404,10 @@ int ff_ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile) · 403 unmodified lines
404 hi = get_vlc2(gb, band->blk_vlc.tab->table, IVI_VLC_BITS, 1);404 hi = get_vlc2(gb, band->blk_vlc.tab->table, IVI_VLC_BITS, 1);
405 val = IVI_TOSIGNED((hi << 6) | lo); /* merge them and convert into signed val */405 val = IVI_TOSIGNED((hi << 6) | lo); /* merge them and convert into signed val */
406 } else {406 } else {
407 if (sym >= 256U) {
408 av_log(NULL, AV_LOG_ERROR, "Invalid sym encountered: %d.\n", sym);
409 return -1;
410 }
407 run = rvmap->runtab[sym];411 run = rvmap->runtab[sym];
408 val = rvmap->valtab[sym];412 val = rvmap->valtab[sym];
409 }413 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t