aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kang <daniel.d.kang@gmail.com>2011-01-15 10:18:38 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2011-01-15 10:18:38 +0000
commiteb40d7ffa7d455697849a0a505ca42836b30aa6d (patch)
tree7fa185117b1133f94ac64bab714c67b43a7589f6
parent0db5d2b09e9a291999a081dac42cff69b9ea9f5d (diff)
downloadffmpeg-eb40d7ffa7d455697849a0a505ca42836b30aa6d.tar.gz
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
-rw-r--r--libavcodec/ivi_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index b15845808f..0e552bccfe 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -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];
}