Check for vectable ID > 0, fixes issue 2508.

Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26294 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Daniel Kang 2011-01-10 10:36:14 +00:00 committed by Carl Eugen Hoyos
parent 43c34675af
commit 8e37a1deb3
1 changed files with 1 additions and 1 deletions

View File

@ -387,7 +387,7 @@ static int truemotion1_decode_header(TrueMotion1Context *s)
if ((header.compression & 1) && header.header_type)
sel_vector_table = pc_tbl2;
else {
if (header.vectable < 4)
if (header.vectable > 0 && header.vectable < 4)
sel_vector_table = tables[header.vectable - 1];
else {
av_log(s->avctx, AV_LOG_ERROR, "invalid vector table id (%d)\n", header.vectable);